diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-26 15:37:43 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-26 15:38:08 -0800 |
commit | c7c0c8b65981ab2163269ac8869ac763dc9f15c2 (patch) | |
tree | 2598ad7e295e9db07427446b3c6a98bf9531a1df /tests | |
parent | 7e76f092a00491532b9bbeb8d2655d7e6c313a20 (diff) | |
download | coreutils-c7c0c8b65981ab2163269ac8869ac763dc9f15c2.tar.xz |
shuf: test input-closed bug
Problem reported by Alex Ryan (Bug#25029).
* tests/misc/shuf.sh: Test for shuffling with stdin closed.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/shuf.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/shuf.sh b/tests/misc/shuf.sh index dcc7e82a3..2e6141b70 100755 --- a/tests/misc/shuf.sh +++ b/tests/misc/shuf.sh @@ -166,4 +166,9 @@ printf "A\nB\nC\nD\nE\n" | shuf --rep -n0 > exp || framework_failure_ test \! -s exp || { fail=1; echo "--repeat,STDIN,-n0 produced bad output">&2 ; } +# shuf 8.25 mishandles input if stdin is closed, due to glibc bug#15589. +# See coreutils bug#25029. +shuf /dev/null <&- >out || fail=1 +compare /dev/null out || fail=1 + Exit $fail |