From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id 7D3143857C45 for ; Thu, 6 Aug 2020 23:34:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7D3143857C45 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 238EC11104; Fri, 7 Aug 2020 01:34:01 +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 gHlVLp4XlqJf; Fri, 7 Aug 2020 01:34:00 +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 82FA719BE; Fri, 7 Aug 2020 01:34:00 +0200 (CEST) Received: from samy by function with local (Exim 4.94) (envelope-from ) id 1k3pOZ-004Cst-9z; Fri, 07 Aug 2020 01:33:59 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] tst-cancel4: Make blocking on write more portable Date: Fri, 7 Aug 2020 01:33:59 +0200 Message-Id: <20200806233359.1002798-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , X-List-Received-Date: Thu, 06 Aug 2020 23:34:05 -0000 * nptl/tst-cancel4.c (tf_send, tf_sendto): Set socket buffer size after connecting. --- nptl/tst-cancel4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nptl/tst-cancel4.c b/nptl/tst-cancel4.c index 5250a30b2e..6a4fb64894 100644 --- a/nptl/tst-cancel4.c +++ b/nptl/tst-cancel4.c @@ -753,13 +753,13 @@ tf_send (void *arg) if (tempfd2 == -1) FAIL_EXIT1 ("socket (AF_UNIX, SOCK_STREAM, 0): %m"); - set_socket_buffer (tempfd2); - if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0) FAIL_EXIT1 ("connect: %m"); unlink (sun.sun_path); + set_socket_buffer (tempfd2); + xpthread_barrier_wait (&b2); if (arg != NULL) @@ -1288,13 +1288,13 @@ tf_sendto (void *arg) if (tempfd2 == -1) FAIL_EXIT1 ("socket (AF_UNIX, SOCK_STREAM, 0): %m"); - set_socket_buffer (tempfd2); - if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0) FAIL_EXIT1 ("connect: %m"); unlink (sun.sun_path); + set_socket_buffer (tempfd2); + xpthread_barrier_wait (&b2); if (arg != NULL) -- 2.27.0