diff options
author | 1999-05-26 00:08:02 +0000 | |
---|---|---|
committer | 1999-05-26 00:08:02 +0000 | |
commit | 549fb40fb21a2d0ef88b9c34cdedfac95193be78 (patch) | |
tree | 14205a37e12d423b57f936c57d9793d85f04d82e /lib | |
parent | show a bit more information when checks fail (diff) | |
download | wireguard-openbsd-549fb40fb21a2d0ef88b9c34cdedfac95193be78.tar.xz wireguard-openbsd-549fb40fb21a2d0ef88b9c34cdedfac95193be78.zip |
count and chec the number of times the self-cancelling thread tries to cancel itself
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc_r/TEST/test_cancel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/TEST/test_cancel.c b/lib/libc_r/TEST/test_cancel.c index fe8aa18a8fa..570ea90e1ad 100644 --- a/lib/libc_r/TEST/test_cancel.c +++ b/lib/libc_r/TEST/test_cancel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_cancel.c,v 1.2 1999/03/10 09:23:55 d Exp $ */ +/* $OpenBSD: test_cancel.c,v 1.3 1999/05/26 00:08:02 d Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public Domain. */ #include <pthread.h> @@ -70,6 +70,7 @@ c2handler(void *arg) v(); } +static int message_seen = 0; void * child2fn(arg) void *arg; @@ -105,7 +106,9 @@ child2fn(arg) c2_in_test = 1; pthread_testcancel(); printf("you should see this message exactly once\n"); + message_seen++; c2_in_test = 0; + ASSERT(message_seen == 1); } PANIC("child 2"); } |