On 05/03/19 13:43, Assaf Gordon wrote:
> On NetBSD 7.1 / x86_64:
> 
> first, the "tests/misc/tac-2-nonseekable" test seems to hang,
> and I had to kill the command "tac - -" to force the tests
> to continue.

Hrm, I presume <&- is not working there to close stdin?
The attached should detect and avoid this case.

thanks,
Pádraig
>From b423bae2f10941b3da07d97288652e3ad01e8565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Wed, 6 Mar 2019 21:39:15 -0800
Subject: [PATCH] tests: tac-2-nonseekable: ensure we don't block indefinitely

* tests/misc/tac-2-nonseekable.sh: Add a timeout to both
protect and check whether we can close stdin correctly.
---
 tests/misc/tac-2-nonseekable.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/misc/tac-2-nonseekable.sh b/tests/misc/tac-2-nonseekable.sh
index 7c677e6..0384c18 100755
--- a/tests/misc/tac-2-nonseekable.sh
+++ b/tests/misc/tac-2-nonseekable.sh
@@ -36,7 +36,10 @@ for file in /proc/version /sys/kernel/profiling; do
   fi
 done
 
+# Assume timeout is due to failure to close stdin with <&-
+# which was seen on NetBSD 7.1 / x86_64
+returns_ 124 timeout 10 tac - - <&- 2>err && skip_ 'error closing stdin'
 # This failed due to heap corruption from v8.15-v8.25 inclusive.
-returns_ 1 tac - - <&- 2>err || fail=1
+returns_ 1 timeout 10 tac - - <&- 2>err || fail=1
 
 Exit $fail
-- 
2.9.3

Reply via email to