]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid intermittent false failures with ksh
authorPádraig Brady <P@draigBrady.com>
Wed, 15 Apr 2026 14:27:44 +0000 (15:27 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 15 Apr 2026 14:34:19 +0000 (15:34 +0100)
As noted in https://bugs.gnu.org/9089
ksh gives intermittent ECONNRESET errors with closed pipes.
This can be seen reliably on Linux with:
ksh -c 'yes | (sleep .1; head -n10 >/dev/null)'

* tests/misc/io-errors.sh: Avoid part of test on ksh.
* tests/misc/write-errors.sh: Likewise.

tests/misc/io-errors.sh
tests/misc/write-errors.sh

index d8efee08a2f7bb5ef38e0e50b807419fea3fa7a7..8d01aa913e7e6fa65baf8c5367b97d43adff370b 100755 (executable)
@@ -92,6 +92,9 @@ while read writer; do
   { test $? = 124 || ! grep -E "$error_re" full.err >/dev/null; } &&
    { fail=1; cat full.err; echo "$writer: failed to exit" >&2; }
 
+  # https://github.com/ksh93/ksh/issues/741
+  $SHELL -c 'test -n "$KSH_VERSION"' && continue
+
   # Check closed pipe handling
   rm -f pipe.err || framework_failure_
   timeout 10 env --default-signal=PIPE $SHELL -c \
index 965afc65235fc7fa7ed65fa8b8da2c0ba4e045f9..f1a9000a6f1576f84e96ff48dd461478f50832b2 100755 (executable)
@@ -89,6 +89,9 @@ while read writer; do
   { test $? = 124 || ! grep "$ENOSPC" full.err >/dev/null; } &&
    { fail=1; cat full.err; echo "$writer: failed to exit" >&2; }
 
+  # https://github.com/ksh93/ksh/issues/741
+  $SHELL -c 'test -n "$KSH_VERSION"' && continue
+
   # Check closed pipe handling
   rm -f pipe.err || framework_failure_
   timeout 10 env --default-signal=PIPE $SHELL -c \