From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id B754F3858D3C for ; Fri, 9 Feb 2024 17:54:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B754F3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aurel32.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B754F3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:bc8:30d7:100::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707501264; cv=none; b=PQ1OYbh2Xt1WWfIC7KDZz24sQVGJ7lUw6Dkt9RrgfclSxKIpq0AXd4zGeeV+vhwjP4eJxsH4lOqg69UnlLXL/ByoQSdYCneTgCurlvT8jwjoKqY4oOyJpCjnoo3nbMPiLHYRnlT/tPJlV5CudSy1b8YJXjajRk5PMqTTvbkurZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707501264; c=relaxed/simple; bh=/OKL92tSTpveqND/3pVIImuhscmZXxpCfFF3sen+I8Y=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=WdIq5+5/2H4xjCahxHgWhMYJPXRWHXYQ4bl9v59FQ+Uk3G7KU/Y5hnx48xT1p3d2GfYwHOV7MhWHwA4iHV32+6TglPXpwBl18SNScoSsdlXznOOWTYNmY9Rc5wq7o5Llbl3AAHlt+u4LPBZ9oemOLN5IbDJknKSQiZUfZs3ghr0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=8UhW9HmiGHnpn82ny50vaCc7hklHcmqGANiUs+Pt+aE=; b=oGRdyamkijPhTy6rP6vIHNd7JN qMku+uv9h4mh1RauBoMQSBv8vQHA0CbZzc2wXqHwAM0DKe0/FU2mZtiMDkOUZF34yzEOp78Ct/GNr 7IUJavWdRRECRxysOXFrYKGUprfs2nfOnpinAdSu4jj8eKdkLw7a/MbPgY+sBG07uvJtMH7kjdE8/ Q1xyT1tWNGHsu+RX7F+wnr8HVYm4FSY73Ft5IZ74AKlyf+1wa8d6ekD7NKyjPCGeiDpODNejKt5zg f8nj6OKbYHCQpOdpeNlPwg/Qp3pNnNZq/yTwkQ90E+TGdULY5OJ9Zzam/bXrXzTRU1xb8Pb5uEhG5 nesl7Cqg==; Received: from ohm.aurel32.net ([2001:bc8:30d7:111::2] helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rYV4u-003Bm5-0P; Fri, 09 Feb 2024 18:54:20 +0100 Date: Fri, 9 Feb 2024 18:54:19 +0100 From: Aurelien Jarno To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] misc: tst-poll: Proper synchronize with child before sending the signal Message-ID: Mail-Followup-To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20240126112341.2286758-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240126112341.2286758-1-adhemerval.zanella@linaro.org> User-Agent: Mutt/2.2.12 (2023-09-09) X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-01-26 08:23, Adhemerval Zanella wrote: > When running the testsuite in parallel, for instance running make -j > $(nproc) check, occasionally tst-epoll fails with a timeout. It happens > because it sometimes takes a bit more than 10ms for the process to get > cloned and blocked by the syscall. In that case the signal is > sent to early, and the test fails with a timeout. > > Checked on x86_64-linux-gnu. > --- > sysdeps/unix/sysv/linux/tst-epoll.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/tst-epoll.c b/sysdeps/unix/sysv/linux/tst-epoll.c > index 3b38beae6e..545f506faa 100644 > --- a/sysdeps/unix/sysv/linux/tst-epoll.c > +++ b/sysdeps/unix/sysv/linux/tst-epoll.c > @@ -22,7 +22,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > > @@ -97,8 +97,8 @@ test_epoll_basic (epoll_wait_check_t epoll_wait_check) > xclose (fds[0][0]); > xclose (fds[1][1]); > > - /* Wait some time so child is blocked on the syscall. */ > - nanosleep (&(struct timespec) {0, 10000000}, NULL); > + /* Wait until child is blocked on epoll_wait. */ > + support_process_state_wait (p, support_process_state_sleeping); > TEST_COMPARE (kill (p, SIGUSR1), 0); > > int e = epoll_wait_check (efd, &event, 1, 500000000, &ss); Thanks for working on the patch and sorry for taking so long to test it. There is a minor typo on the subject (poll -> epoll), but otherwise works as expected, so: Tested-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://aurel32.net