From 8a1f4344639795a783c0ccd39ba8f02282d833ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Sun, 21 Sep 2025 16:37:26 +0100 Subject: [PATCH] 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. --- tests/fold/fold-zero-width.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } -- 2.47.3