about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-23 22:00:53 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-24 00:02:31 +0200
commit9f6e508b4270093607676361e68dfd7a0bf91492 (patch)
tree118f717487e9eca1420c98a50b9e01202fb8bd91
parentae725e3f9cb4e1eb825ebe1d55241c98c2ea32f1 (diff)
downloadglibc-9f6e508b4270093607676361e68dfd7a0bf91492.tar.gz
glibc-9f6e508b4270093607676361e68dfd7a0bf91492.tar.xz
glibc-9f6e508b4270093607676361e68dfd7a0bf91492.zip
htl: Enable tst-cancel25 test
* nptl/tst-cancel25.c: Move to...
* sysdeps/pthread/tst-cancel25.c: ... here.
(tf2) Do not test for SIGCANCEL when it is not defined.
* nptl/Makefile: Move corresponding reference to...
* sysdeps/pthread/Makefile: ... here.
-rw-r--r--nptl/Makefile2
-rw-r--r--sysdeps/pthread/Makefile2
-rw-r--r--sysdeps/pthread/tst-cancel25.c (renamed from nptl/tst-cancel25.c)2
3 files changed, 4 insertions, 2 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 60483c1ec4..24ebd07a30 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -307,7 +307,7 @@ tests-container =  tst-pthread-getattr
 tests-internal := tst-robustpi8 tst-rwlock19 tst-rwlock20 \
 		  tst-sem11 tst-sem12 tst-sem13 \
 		  tst-barrier5 tst-signal7 tst-mutex8 tst-mutex8-static \
-		  tst-mutexpi8 tst-mutexpi8-static tst-cancel25 \
+		  tst-mutexpi8 tst-mutexpi8-static \
 		  tst-setgetname \
 
 xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index c9ba6f8f12..01602e69d5 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -214,7 +214,7 @@ generated += tst-atfork2.mtrace
 generated += $(objpfx)tst-atfork2.mtrace \
 	     $(addsuffix .so,$(strip $(modules-names)))
 
-tests-internal += tst-robust8
+tests-internal += tst-cancel25 tst-robust8
 
 tests += tst-oncex3 tst-oncex4
 
diff --git a/nptl/tst-cancel25.c b/sysdeps/pthread/tst-cancel25.c
index c6e1c23c02..0b3a82b804 100644
--- a/nptl/tst-cancel25.c
+++ b/sysdeps/pthread/tst-cancel25.c
@@ -18,11 +18,13 @@ tf2 (void *arg)
       puts ("pthread_sigmask failed");
       exit (1);
     }
+#ifdef SIGCANCEL
   if (sigismember (&mask, SIGCANCEL))
     {
       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);