]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
NPTL: Conditionalize some sanity tests for SIGCANCEL/SIGSETXID.
authorRoland McGrath <roland@hack.frob.com>
Fri, 6 Feb 2015 20:31:11 +0000 (12:31 -0800)
committerRoland McGrath <roland@hack.frob.com>
Fri, 6 Feb 2015 20:31:11 +0000 (12:31 -0800)
ChangeLog
nptl/tst-cancel25.c
nptl/tst-signal7.c

index 76bfa13b20923d4f8019a7bbcc7983c9d74a5827..85e3010482610a4ad4d3f39ad1e6d720872aa2d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-06  Roland McGrath  <roland@hack.frob.com>
 
+       * nptl/tst-cancel25.c (tf2): Test for SIGCANCEL being blocked only if
+       it's defined.
+       * nptl/tst-signal7.c (do_test): Test SIGCANCEL only if it's defined.
+       Test SIGSETXID only if it's defined.
+
        * nptl/tst-locale1.c (useless): Use SIGRTMIN only if it's defined.
 
        * rt/tst-timer2.c (do_test): Don't initialize SIGEV.sigev_signo, which
index 00b99ad553f679388c695d7fb9e382a19362c503..ed4205ec45a3fa3ee03b39060f1588339076e677 100644 (file)
@@ -11,6 +11,7 @@ static pthread_t th2;
 static void *
 tf2 (void *arg)
 {
+#ifdef SIGCANCEL
   sigset_t mask;
   if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0)
     {
@@ -22,6 +23,7 @@ tf2 (void *arg)
       puts ("SIGCANCEL blocked in new thread");
       exit (1);
     }
+#endif
 
   /* Sync with the main thread so that we do not test anything else.  */
   int e = pthread_barrier_wait (&b);
index b3889891cc54e32d3f333a28a6e137adf24388ed..1fbf3dbf7203baf573219154995ba00d84b3f57c 100644 (file)
@@ -27,6 +27,7 @@ do_test (void)
 {
   int result = 0;
 
+#ifdef SIGCANCEL
   errno = 0;
   if (sigaction (SIGCANCEL, NULL, NULL) == 0)
     {
@@ -38,7 +39,9 @@ do_test (void)
       puts ("sigaction(SIGCANCEL) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
+#ifdef SIGSETXID
   errno = 0;
   if (sigaction (SIGSETXID, NULL, NULL) == 0)
     {
@@ -50,6 +53,7 @@ do_test (void)
       puts ("sigaction(SIGSETXID) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
   return result;
 }