From patchwork Fri Aug 7 07:54:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1342128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BNHgR4dY2z9sPB for ; Fri, 7 Aug 2020 17:54:11 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DE053851C2B; Fri, 7 Aug 2020 07:54:09 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id 9F12E3851C2B for ; Fri, 7 Aug 2020 07:54:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9F12E3851C2B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id A2BB1110C8; Fri, 7 Aug 2020 09:54:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DEtQnYvflZZ7; Fri, 7 Aug 2020 09:54:04 +0200 (CEST) Received: from function (lfbn-bor-1-797-11.w86-234.abo.wanadoo.fr [86.234.239.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 32E65110B5; Fri, 7 Aug 2020 09:54:04 +0200 (CEST) Received: from samy by function with local (Exim 4.94) (envelope-from ) id 1k3xCV-000YEp-Ak; Fri, 07 Aug 2020 09:54:03 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] htl: Enable tst-cancelx?[45] Date: Fri, 7 Aug 2020 09:54:03 +0200 Message-Id: <20200807075403.131570-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * 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 --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