unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] t/v2writable: avoid failure on strace un-readyiness
@ 2024-08-30 19:05 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-08-30 19:05 UTC (permalink / raw)
  To: meta

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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-30 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 19:05 [PATCH] t/v2writable: avoid failure on strace un-readyiness Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).