mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
htl: Enable tst-cancelx?[45]
* 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.
This commit is contained in:
parent
b71bc845dd
commit
ac54c335e9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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. */
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user