It seems that NetBSD requires a fifo to be open, not merely opened,
to ensure a subsequent open proceeds. Immediately closing the opened
fifo caused intermittent failures on NetBSD 10.0. While that seems
like a bug in NetBSD, we can avoid the issue.
* tests/tail/pid-pipe.sh: Hold the fifo open until our writer
has opened it. This also allows specifying a single timeout
(of 12.7s), rather than 2 separate timeouts.
---
tests/tail/pid-pipe.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/tail/pid-pipe.sh b/tests/tail/pid-pipe.sh
index b4a964e3a..20f083ef2 100755
--- a/tests/tail/pid-pipe.sh
+++ b/tests/tail/pid-pipe.sh
@@ -64,8 +64,11 @@ silent_writer() {
silent_writer & writer_pid=$!
# allow fifo to open
-timeout 10 $SHELL -c ': < fifo' || framework_failure_
-retry_delay_ writer_ready_ .1 6 || framework_failure_
+$SHELL -c 'read x < fifo' & pid=$!
+retry_delay_ writer_ready_ .1 7 || framework_failure_
+kill "$pid" 2>/dev/null
+wait "$pid" 2>/dev/null
+pid=
sleep 1 & pid=$!
returns_ 124 timeout 10 tail -f $fastpoll --pid=$pid fifo && fail=1
--
2.55.0