]> sourceware.org Git - glibc.git/commitdiff
Conditionalize some test code for SIGRTMIN, SA_SIGINFO.
authorRoland McGrath <roland@hack.frob.com>
Wed, 4 Mar 2015 23:14:56 +0000 (15:14 -0800)
committerRoland McGrath <roland@hack.frob.com>
Wed, 4 Mar 2015 23:14:56 +0000 (15:14 -0800)
ChangeLog
nptl/tst-cancel4.c
nptl/tst-signal3.c
nptl/tst-signal6.c
rt/tst-mqueue5.c
rt/tst-timer4.c

index 52e46c4450df3d25f92d37f32327f7ff3a9d7bf5..10cdc67d216cf9f15604f9bd9f8be1b4de7d9d48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-03-04  Roland McGrath  <roland@hack.frob.com>
+
+       * nptl/tst-cancel4.c (tf_sigpause) [!SIGCANCEL]: Call pause instead of
+       __xpg_sigpause.
+       * nptl/tst-signal3.c: Conditionalize body on [SIGRTMIN].
+       * nptl/tst-signal6.c: Likewise.
+       * rt/tst-mqueue5.c: Conditionalize body on [SIGRTMIN && SA_SIGINFO].
+       * rt/tst-timer4.c: Conditionalize body on [SA_SIGINFO].
+
 2015-03-04  Roland McGrath  <roland@hack.frob.com>
 
        * configure.ac (libc_cv_cxx_link_ok): New check.
index 49167466143b8c73b1bfbb0806a86c6493de2177..e50afd7900453893f0388bdc04d996a85273fd81 100644 (file)
@@ -781,9 +781,13 @@ tf_sigpause (void *arg)
 
   pthread_cleanup_push (cl, NULL);
 
+#ifdef SIGCANCEL
   /* Just for fun block the cancellation signal.  We need to use
      __xpg_sigpause since otherwise we will get the BSD version.  */
   __xpg_sigpause (SIGCANCEL);
+#else
+  pause ();
+#endif
 
   pthread_cleanup_pop (0);
 
index c17933e2433a3c3615adfb301b87b8b21441b220..90b2e71b28aa99fd8524ae5463e8b599a9dc01e7 100644 (file)
 #include <unistd.h>
 
 
-/* Number of different signalss to use.  Also is the number of
-   threads.  */
-#define N 10
+#ifdef SIGRTMIN
+
+/* Number of different signals to use.  Also is the number of threads.  */
+# define N 10
 /* Maximum number of threads in flight at any one time.  */
-#define INFLIGHT 5
+# define INFLIGHT 5
 /* Number of signals sent in total.  */
-#define ROUNDS 10000
+# define ROUNDS 10000
 
 
 static int received[N][N];
@@ -255,6 +256,11 @@ do_test (void)
   return result;
 }
 
-#define TIMEOUT 10
-#define TEST_FUNCTION do_test ()
+# define TIMEOUT 10
+# define TEST_FUNCTION do_test ()
+
+#else
+# define TEST_FUNCTION 0
+#endif
+
 #include "../test-skeleton.c"
index e2a56ef4278f3aff96fa6162fb3b7259d18449c8..b98947a9e7ddda3cc2edbd01e6dc795a1a90d4a6 100644 (file)
@@ -24,7 +24,9 @@
 #include <unistd.h>
 
 
-#define N 2
+#ifdef SIGRTMIN
+
+# define N 2
 static pthread_barrier_t bar;
 static struct
 {
@@ -187,5 +189,9 @@ do_test (void)
   return 0;
 }
 
-#define TEST_FUNCTION do_test ()
+# define TEST_FUNCTION do_test ()
+
+#else
+# define TEST_FUNCTION 0
+#endif
 #include "../test-skeleton.c"
index 8714dad3f4c43e31407c7cb4f2d96cf001a8e7ea..6000f728789308c0b513e969e7eb83e893f2c274 100644 (file)
@@ -35,7 +35,7 @@
 
 #define TIMEOUT 3
 
-#if _POSIX_THREADS
+#if _POSIX_THREADS && defined SIGRTMIN && defined SA_SIGINFO
 # include <pthread.h>
 
 volatile int rtmin_cnt;
index 4a06496cb6ff091aa2cef5ab852d77dbe0ee3d16..f694e300c5e64da330357b3bd0c1e1575d3c1144 100644 (file)
@@ -24,7 +24,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <stdint.h>
-#if _POSIX_THREADS
+#if _POSIX_THREADS && defined SA_SIGINFO
 # include <pthread.h>
 
 # ifndef TEST_CLOCK
@@ -641,6 +641,11 @@ do_test (void)
     }
   return result;
 }
+
+#elif defined TEST_CLOCK_MISSING
+/* This just ensures that any functions called in TEST_CLOCK_MISSING
+   are not diagnosed as unused.  */
+# define TEST_FUNCTION (TEST_CLOCK_MISSING (TEST_CLOCK), 0)
 #else
 # define TEST_FUNCTION 0
 #endif
This page took 0.124274 seconds and 5 git commands to generate.