From: Pádraig Brady
Date: Wed, 15 Apr 2026 14:27:44 +0000 (+0100) Subject: tests: avoid intermittent false failures with ksh X-Git-Tag: v9.11~20 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bc79ba83ac1fde8fed614c526bb32ae5413797c1;p=thirdparty%2Fcoreutils.git tests: avoid intermittent false failures with ksh 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. --- diff --git a/tests/misc/io-errors.sh b/tests/misc/io-errors.sh index d8efee08a2..8d01aa913e 100755 --- a/tests/misc/io-errors.sh +++ b/tests/misc/io-errors.sh @@ -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 \ diff --git a/tests/misc/write-errors.sh b/tests/misc/write-errors.sh index 965afc6523..f1a9000a6f 100755 --- a/tests/misc/write-errors.sh +++ b/tests/misc/write-errors.sh @@ -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 \