]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false failure on AIX 7.2
authorPádraig Brady <P@draigBrady.com>
Fri, 22 Dec 2017 13:10:24 +0000 (13:10 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 23 Dec 2017 10:25:57 +0000 (10:25 +0000)
* tests/tail-2/pipe-f.sh: Close stdout in a subshell
to ensure the current shell isn't impacted.  Subsequent
piped commands like `echo foo | blah` were seen to fail
due to the previous closing of stdout.
Reported by Assaf Gordon.

tests/tail-2/pipe-f.sh

index 759881c3fef25737cbc3a03ba1e968e1926e011c..3dd85ec2e6e18bac82f056dc5413cc5bd4f57bd1 100755 (executable)
@@ -40,7 +40,7 @@ compare exp out || fail=1
 timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1
 
 # This would wait indefinitely before v8.28 (until first write)
-returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&- || fail=1
+(returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=1
 done
 
 Exit $fail