1 /* Test sig*set functions. */
5 #include <support/check.h>
11 TEST_VERIFY (sigemptyset (&set) == 0);
13 #define VERIFY(set, sig) \
14 TEST_VERIFY (sigismember (&set, sig) == 0); \
15 TEST_VERIFY (sigaddset (&set, sig) == 0); \
16 TEST_VERIFY (sigismember (&set, sig) != 0); \
17 TEST_VERIFY (sigdelset (&set, sig) == 0); \
18 TEST_VERIFY (sigismember (&set, sig) == 0)
20 /* ISO C99 signals. */
23 VERIFY (set, SIGABRT);
25 VERIFY (set, SIGSEGV);
26 VERIFY (set, SIGTERM);
28 /* Historical signals specified by POSIX. */
30 VERIFY (set, SIGQUIT);
31 VERIFY (set, SIGTRAP);
32 VERIFY (set, SIGKILL);
35 VERIFY (set, SIGPIPE);
36 VERIFY (set, SIGALRM);
38 /* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
40 VERIFY (set, SIGSTOP);
41 VERIFY (set, SIGTSTP);
42 VERIFY (set, SIGCONT);
43 VERIFY (set, SIGCHLD);
44 VERIFY (set, SIGTTIN);
45 VERIFY (set, SIGTTOU);
46 VERIFY (set, SIGPOLL);
47 VERIFY (set, SIGXCPU);
48 VERIFY (set, SIGXFSZ);
49 VERIFY (set, SIGVTALRM);
50 VERIFY (set, SIGPROF);
51 VERIFY (set, SIGUSR1);
52 VERIFY (set, SIGUSR2);
54 /* Nonstandard signals found in all modern POSIX systems
55 (including both BSD and Linux). */
56 VERIFY (set, SIGWINCH);
58 /* Arch-specific signals. */
63 VERIFY (set, SIGLOST);
66 VERIFY (set, SIGINFO);
69 VERIFY (set, SIGSTKFLT);
75 /* Read-time signals (POSIX.1b real-time extensions). If they are
76 supported SIGRTMAX value is greater than SIGRTMIN. */
77 for (int rtsig = SIGRTMIN; rtsig <= SIGRTMAX; rtsig++)
85 #include <support/test-driver.c>