summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/misc/shuf.sh5
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