diff options
author | deischen <deischen@FreeBSD.org> | 1999-12-05 00:48:53 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 1999-12-05 00:48:53 +0000 |
commit | 7f8a2b1734e8e5233083e8b192e7c6da44ec99e4 (patch) | |
tree | 8d5647ac03ca38187508ed566f9b0c395c06a69d /lib/libc_r/test | |
parent | 795e5a14ec1408b6597626c4d3b1e8d030992c2d (diff) | |
download | FreeBSD-src-7f8a2b1734e8e5233083e8b192e7c6da44ec99e4.zip FreeBSD-src-7f8a2b1734e8e5233083e8b192e7c6da44ec99e4.tar.gz |
Make work for sigset_t change. Also modify tests to account for
recent changes to signal handling.
Diffstat (limited to 'lib/libc_r/test')
-rw-r--r-- | lib/libc_r/test/sigsuspend/sigsuspend.c | 4 | ||||
-rw-r--r-- | lib/libc_r/test/sigwait/sigwait.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc_r/test/sigsuspend/sigsuspend.c b/lib/libc_r/test/sigsuspend/sigsuspend.c index 7921e8a..153c6e0 100644 --- a/lib/libc_r/test/sigsuspend/sigsuspend.c +++ b/lib/libc_r/test/sigsuspend/sigsuspend.c @@ -111,7 +111,7 @@ sighandler (int signo) printf (" -> Suspender thread signal handler caught signal %d\n", signo); sigprocmask (SIG_SETMASK, NULL, &set); - if (set != suspender_mask) + if (memcmp(&set, &suspender_mask, sizeof(set))) printf (" >>> FAIL: sigsuspender signal handler running " "with incorrect mask.\n"); } @@ -231,7 +231,7 @@ int main (int argc, char *argv[]) sleep (1); send_process_signal (SIGURG); sleep (1); - if (sigcounts[SIGURG] != 3) + if (sigcounts[SIGURG] != 2) printf ("FAIL: sigsuspend doesn't wake up for SIGURG.\n"); /* diff --git a/lib/libc_r/test/sigwait/sigwait.c b/lib/libc_r/test/sigwait/sigwait.c index 4fcaa4f..961691d 100644 --- a/lib/libc_r/test/sigwait/sigwait.c +++ b/lib/libc_r/test/sigwait/sigwait.c @@ -118,7 +118,7 @@ int main (int argc, char *argv[]) /* Initialize our signal counts. */ memset ((void *) sigcounts, 0, NSIG * sizeof (int)); - /* Setupt our wait mask. */ + /* Setup our wait mask. */ sigemptyset (&wait_mask); /* Default action */ sigaddset (&wait_mask, SIGHUP); /* terminate */ sigaddset (&wait_mask, SIGINT); /* terminate */ @@ -250,7 +250,7 @@ int main (int argc, char *argv[]) if (sigcounts[SIGHUP] != 1) printf ("FAIL: sigwait doesn't wake up for SIGHUP.\n"); /* - * Add SIGHUP to all threads pending signals. Since there is + * Add SIGHUP to the process pending signals. Since there is * a signal handler installed for SIGHUP and this signal is * blocked from the waiter thread and unblocked in the main * thread, the signal handler should be called once for SIGHUP. @@ -259,11 +259,11 @@ int main (int argc, char *argv[]) /* Release the waiter thread and allow him to run. */ pthread_mutex_unlock (&waiter_mutex); sleep (1); - if (sigcounts[SIGHUP] != 3) + if (sigcounts[SIGHUP] != 2) printf ("FAIL: sigwait doesn't return for pending SIGHUP.\n"); /* - * Repeat the above test using pthread_kill and SIGUSR1 + * Repeat the above test using pthread_kill and SIGUSR1. */ sigcounts[SIGUSR1] = 0; pthread_mutex_lock (&waiter_mutex); |