diff mbox series

[hurd,commited] htl: Enable tst-cancelx?[45]

Message ID 20200807075403.131570-1-samuel.thibault@ens-lyon.org
State New
Headers show
Series [hurd,commited] htl: Enable tst-cancelx?[45] | expand

Commit Message

Samuel Thibault Aug. 7, 2020, 7:54 a.m. UTC
* nptl/{tst-cancel4-common.c, tst-cancel4-common.h, tst-cancel4.c,
tst-cancel5.c, tst-cancelx4.c, tst-cancelx5.c}: Move to sysdeps/pthread/
* nptl/Makefile: Move corresponding rules to...
* sysdeps/pthread/Makefile: ... here.
---
 nptl/Makefile                                  | 16 ++--------------
 sysdeps/pthread/Makefile                       | 13 ++++++++++++-
 {nptl => sysdeps/pthread}/tst-cancel4-common.c |  0
 {nptl => sysdeps/pthread}/tst-cancel4-common.h |  1 +
 {nptl => sysdeps/pthread}/tst-cancel4.c        |  3 ++-
 {nptl => sysdeps/pthread}/tst-cancel5.c        |  0
 {nptl => sysdeps/pthread}/tst-cancelx4.c       |  0
 {nptl => sysdeps/pthread}/tst-cancelx5.c       |  0
 8 files changed, 17 insertions(+), 16 deletions(-)
 rename {nptl => sysdeps/pthread}/tst-cancel4-common.c (100%)
 rename {nptl => sysdeps/pthread}/tst-cancel4-common.h (99%)
 rename {nptl => sysdeps/pthread}/tst-cancel4.c (99%)
 rename {nptl => sysdeps/pthread}/tst-cancel5.c (100%)
 rename {nptl => sysdeps/pthread}/tst-cancelx4.c (100%)
 rename {nptl => sysdeps/pthread}/tst-cancelx5.c (100%)
diff mbox series

Patch

diff --git a/nptl/Makefile b/nptl/Makefile
index 89569c4f46..b30d263ca4 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -277,7 +277,7 @@  tests = tst-attr2 tst-attr3 tst-default-attr \
 	tst-once5 \
 	tst-sem17 \
 	tst-tsd3 tst-tsd4 \
-	tst-cancel4 tst-cancel4_1 tst-cancel4_2 tst-cancel5 \
+	tst-cancel4_1 tst-cancel4_2 \
 	tst-cancel7 tst-cancel17 tst-cancel24 \
 	tst-cleanup4 \
 	tst-signal3 \
@@ -356,7 +356,7 @@  endif
 
 LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
 
-tests += tst-cancelx4 tst-cancelx5 tst-cancelx7 tst-cancelx17 tst-cleanupx4
+tests += tst-cancelx7 tst-cancelx17 tst-cleanupx4
 
 ifeq ($(build-shared),yes)
 tests += tst-compat-forwarder tst-audit-threads
@@ -426,9 +426,6 @@  tests += tst-cancel24-static
 tests-internal += tst-sem11-static tst-sem12-static tst-stackguard1-static
 xtests-static += tst-setuid1-static
 
-# These tests are linked with libc before libpthread
-tests-reverse += tst-cancel5
-
 ifeq ($(run-built-tests),yes)
 tests-special += $(objpfx)tst-stack3-mem.out $(objpfx)tst-oddstacklimit.out
 ifeq ($(build-shared),yes)
@@ -461,17 +458,8 @@  endif
 # function frequently to get a thread-specific handle.
 CFLAGS-pthread_self.os += -fomit-frame-pointer
 
-# The sigmask macro is deprecated and triggers are compiler warning
-# which cannot be suppressed (as of GCC 9).
-CFLAGS-tst-cancel4.c += -Wno-error
-CFLAGS-tst-cancel5.c += -Wno-error
-CFLAGS-tst-cancelx4.c += -Wno-error
-CFLAGS-tst-cancelx5.c += -Wno-error
-
 # Run the cancellation and cleanup tests also for the modern, exception-based
 # implementation.  For this we have to pass the -fexceptions parameter.
-CFLAGS-tst-cancelx4.c += -fexceptions
-CFLAGS-tst-cancelx5.c += -fexceptions
 CFLAGS-tst-cancelx7.c += -fexceptions
 CFLAGS-tst-cancelx17.c += -fexceptions
 CFLAGS-tst-cleanupx4.c += -fexceptions
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 920d875420..45a15b0b1a 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -54,6 +54,7 @@  tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
 	 tst-cancel-self tst-cancel-self-cancelstate \
 	 tst-cancel-self-canceltype tst-cancel-self-testcancel \
 	 tst-cancel1 tst-cancel2 tst-cancel3 \
+	 tst-cancel4 tst-cancel5 \
 	 tst-cancel6 tst-cancel8 tst-cancel9 tst-cancel10 tst-cancel11 \
 	 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 tst-cancel16 \
 	 tst-cancel18 tst-cancel19 tst-cancel20 tst-cancel21 \
@@ -117,6 +118,7 @@  CFLAGS-tst-cleanup2.c += -fno-builtin
 CFLAGS-tst-cleanupx2.c += -fno-builtin
 
 tests += tst-cancelx2 tst-cancelx3 tst-cancelx6 tst-cancelx8 tst-cancelx9 \
+	 tst-cancelx4 tst-cancelx5 \
 	 tst-cancelx10 tst-cancelx11 tst-cancelx12 tst-cancelx13 tst-cancelx14 \
 	 tst-cancelx15 tst-cancelx16 tst-cancelx18 tst-cancelx20 tst-cancelx21 \
 	 tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3
@@ -143,7 +145,7 @@  tests-static += tst-locale1 tst-locale2 tst-cancel21-static
 tests += tst-cancel21-static tst-cond11-static
 
 # These tests are linked with libc before libpthread
-tests-reverse += tst-cancel23 tst-vfork1x tst-vfork2x
+tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x
 
 ifeq ($(run-built-tests),yes)
 ifeq ($(build-shared),yes)
@@ -151,10 +153,19 @@  tests-special += $(objpfx)tst-cleanup0-cmp.out
 endif
 endif
 
+# The sigmask macro is deprecated and triggers are compiler warning
+# which cannot be suppressed (as of GCC 9).
+CFLAGS-tst-cancel4.c += -Wno-error
+CFLAGS-tst-cancel5.c += -Wno-error
+CFLAGS-tst-cancelx4.c += -Wno-error
+CFLAGS-tst-cancelx5.c += -Wno-error
+
 # Run the cancellation and cleanup tests also for the modern, exception-based
 # implementation.  For this we have to pass the -fexceptions parameter.
 CFLAGS-tst-cancelx2.c += -fexceptions
 CFLAGS-tst-cancelx3.c += -fexceptions
+CFLAGS-tst-cancelx4.c += -fexceptions
+CFLAGS-tst-cancelx5.c += -fexceptions
 CFLAGS-tst-cancelx6.c += -fexceptions
 CFLAGS-tst-cancelx8.c += -fexceptions
 CFLAGS-tst-cancelx9.c += -fexceptions
diff --git a/nptl/tst-cancel4-common.c b/sysdeps/pthread/tst-cancel4-common.c
similarity index 100%
rename from nptl/tst-cancel4-common.c
rename to sysdeps/pthread/tst-cancel4-common.c
diff --git a/nptl/tst-cancel4-common.h b/sysdeps/pthread/tst-cancel4-common.h
similarity index 99%
rename from nptl/tst-cancel4-common.h
rename to sysdeps/pthread/tst-cancel4-common.h
index c8763cacba..507d3393c1 100644
--- a/nptl/tst-cancel4-common.h
+++ b/sysdeps/pthread/tst-cancel4-common.h
@@ -74,6 +74,7 @@  set_socket_buffer (int s)
 		    sizeof (val)) == 0);
   TEST_VERIFY_EXIT (getsockopt (s, SOL_SOCKET, SO_SNDBUF, &val, &len) == 0);
   TEST_VERIFY_EXIT (val < WRITE_BUFFER_SIZE);
+  printf("got size %d\n", val);
 }
 
 /* Cleanup handling test.  */
diff --git a/nptl/tst-cancel4.c b/sysdeps/pthread/tst-cancel4.c
similarity index 99%
rename from nptl/tst-cancel4.c
rename to sysdeps/pthread/tst-cancel4.c
index 6a4fb64894..41275262ca 100644
--- a/nptl/tst-cancel4.c
+++ b/sysdeps/pthread/tst-cancel4.c
@@ -769,11 +769,12 @@  tf_send (void *arg)
 
   char mem[WRITE_BUFFER_SIZE];
 
-  send (tempfd2, mem, arg == NULL ? sizeof (mem) : 1, 0);
+  size_t s = send (tempfd2, mem, arg == NULL ? sizeof (mem) : 1, 0);
   /* The send can return a value higher than 0 (meaning partial send)
      due to the SIGCANCEL, but the thread may still be pending
      cancellation.  */
   pthread_testcancel ();
+  printf("send returned %zd\n", s);
 
   pthread_cleanup_pop (0);
 
diff --git a/nptl/tst-cancel5.c b/sysdeps/pthread/tst-cancel5.c
similarity index 100%
rename from nptl/tst-cancel5.c
rename to sysdeps/pthread/tst-cancel5.c
diff --git a/nptl/tst-cancelx4.c b/sysdeps/pthread/tst-cancelx4.c
similarity index 100%
rename from nptl/tst-cancelx4.c
rename to sysdeps/pthread/tst-cancelx4.c
diff --git a/nptl/tst-cancelx5.c b/sysdeps/pthread/tst-cancelx5.c
similarity index 100%
rename from nptl/tst-cancelx5.c
rename to sysdeps/pthread/tst-cancelx5.c