From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 709761F47A for ; Fri, 30 Aug 2024 19:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1725044729; bh=3gmbR6oJ3G8Yz0UoTAfkQ5FZT47bdZkZy84Hg2iJ57U=; h=From:To:Subject:Date:From; b=cLvpRigqBhx9NQ5acg8EpLoiWahSmGH9P3jcJxRSWilnQA9nv/WqDRMGcC6N21gYa S6scDc/jxYuKXZdMudIgtHf4ciSvtxAYSKUaSqCFqT6E1mBw6MRmTvCShKrxy4Vgfc KtSNYzDQIcZxVqG3VLEP2OJr43zw61GCd2OMledE= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/v2writable: avoid failure on strace un-readyiness Date: Fri, 30 Aug 2024 19:05:29 +0000 Message-ID: <20240830190529.2169094-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: poll(2) uses milliseconds, IO::Poll::_poll doesn't abstract that, nor does our ->poll_in wrapper. This ensures we wait enough time for strace to start up on overloaded systems. --- t/v2writable.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/v2writable.t b/t/v2writable.t index 496eba2c..4c24ee92 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -343,7 +343,7 @@ SKIP: { open my $fh, '>', my $trace = "$inboxdir/trace.out"; my $rd = popen_rd([ $strace, '-p', $$, '-o', $trace, '-e', 'inject=pwrite64:error=ENOSPC'], undef, { 2 => 1 }); - $rd->poll_in(10) or die 'strace not ready'; + $rd->poll_in(10_000) or die 'strace not ready'; ok ! eval { open my $olderr, '>&', \*STDERR; open STDERR, '>>', $gfi_err; @@ -362,7 +362,7 @@ SKIP: { $rd = popen_rd([$strace, '-p', $pid, '-o', $trace, '-e', 'inject=write:error=ENOSPC:when=1'], undef, { 2 => 1 }); - $rd->poll_in(10) or die 'strace not ready'; + $rd->poll_in(10_000) or die 'strace not ready'; ok !eval { $im->done }, 'done fails with ENOSPC'; ok $@, '$@ set on ENOSPC'; kill 'TERM', $rd->attached_pid;