about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nptl/Makefile16
-rw-r--r--sysdeps/pthread/Makefile13
-rw-r--r--sysdeps/pthread/tst-cancel4-common.c (renamed from nptl/tst-cancel4-common.c)0
-rw-r--r--sysdeps/pthread/tst-cancel4-common.h (renamed from nptl/tst-cancel4-common.h)1
-rw-r--r--sysdeps/pthread/tst-cancel4.c (renamed from nptl/tst-cancel4.c)3
-rw-r--r--sysdeps/pthread/tst-cancel5.c (renamed from nptl/tst-cancel5.c)0
-rw-r--r--sysdeps/pthread/tst-cancelx4.c (renamed from nptl/tst-cancelx4.c)0
-rw-r--r--sysdeps/pthread/tst-cancelx5.c (renamed from nptl/tst-cancelx5.c)0
8 files changed, 17 insertions, 16 deletions
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
index 9a6924c1c6..9a6924c1c6 100644
--- a/nptl/tst-cancel4-common.c
+++ b/sysdeps/pthread/tst-cancel4-common.c
diff --git a/nptl/tst-cancel4-common.h b/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
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
index 1c879eba8b..1c879eba8b 100644
--- a/nptl/tst-cancel5.c
+++ b/sysdeps/pthread/tst-cancel5.c
diff --git a/nptl/tst-cancelx4.c b/sysdeps/pthread/tst-cancelx4.c
index 1c879eba8b..1c879eba8b 100644
--- a/nptl/tst-cancelx4.c
+++ b/sysdeps/pthread/tst-cancelx4.c
diff --git a/nptl/tst-cancelx5.c b/sysdeps/pthread/tst-cancelx5.c
index c0a18840a0..c0a18840a0 100644
--- a/nptl/tst-cancelx5.c
+++ b/sysdeps/pthread/tst-cancelx5.c