On 06/03/19 21:46, Pádraig Brady wrote: > 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.
The tail-2/pipe-f.sh failure seems similarly due to the shell not supporting >&- The attached should avoid that. thanks, Pádraig
>From 66e2daa689fefec9ed201a04696b9f52d049d89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]> Date: Wed, 6 Mar 2019 22:23:21 -0800 Subject: [PATCH] tests: tail-2/pipe-f: avoid false failure closing stdout * tests/tail-2/pipe-f.sh: Check closing stdout with >&- is effective, which avoids a false failure on NetBSD 7.1 Reported by Assaf Gordon --- tests/tail-2/pipe-f.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/tail-2/pipe-f.sh b/tests/tail-2/pipe-f.sh index 83f072e..1a7b3e3 100755 --- a/tests/tail-2/pipe-f.sh +++ b/tests/tail-2/pipe-f.sh @@ -17,7 +17,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -print_ver_ tail +print_ver_ tail test trap_sigpipe_or_skip_ # Speedup the non inotify case @@ -52,7 +52,12 @@ for disposition in '' '-'; do done # This would wait indefinitely before v8.28 (until first write) -(returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=1 +# test -w /dev/stdout is used to check that >&- is effective +# which was seen not to be the case on NetBSD 7.1 / x86_64: +if env test -w /dev/stdout >/dev/null && + env test ! -w /dev/stdout >&-; then + (returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=1 +fi done Exit $fail -- 2.9.3
