From: Pádraig Brady Date: Sun, 21 Sep 2025 15:37:26 +0000 (+0100) Subject: tests: avoid false failure on older Linux kernels X-Git-Tag: v9.8~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a1f4344639795a783c0ccd39ba8f02282d833ce;p=thirdparty%2Fcoreutils.git tests: avoid false failure on older Linux kernels * tests/fold/fold-zero-width.sh: Check the shell was able to create the redirection file, as intermittently on CentOS 5,6,7 this wasn't the case, with the shell giving an xmalloc failure due to the ulimit. Reported by William Bader and Bruno Haible. --- diff --git a/tests/fold/fold-zero-width.sh b/tests/fold/fold-zero-width.sh index 04cbe4afd6..d90fd0c9cf 100755 --- a/tests/fold/fold-zero-width.sh +++ b/tests/fold/fold-zero-width.sh @@ -56,7 +56,9 @@ vm=$(get_min_ulimit_v_ fold /dev/null) && { for c in '\n' '\0' '\303'; do tr '\0' "$c" < /dev/zero | timeout 10 $SHELL -c \ "(ulimit -v $(($vm+12000)) && fold 2>err >/dev/full)" - { test $? = 124 || ! grep 'space' err >/dev/null; } && + ret=$? + test -f err || skip_ 'shell ulimit failure' + { test $ret = 124 || ! grep 'space' err >/dev/null; } && { fail=1; cat err; echo "fold didn't diagnose ENOSPC" >&2; } done }