]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: printf: avoid false failure
authorPádraig Brady <P@draigBrady.com>
Wed, 15 Jan 2025 01:36:13 +0000 (01:36 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 15 Jan 2025 17:07:19 +0000 (17:07 +0000)
* tests/printf/printf-surprise.sh: Increase the VM limit
to avoid false failures in rare cases.

tests/printf/printf-surprise.sh

index d314c2d3f14b345fc7d686cd3442ed0bd2caa059..9ad42a8dc2ef5c337e9f4daff1a8651204f1420d 100755 (executable)
@@ -61,7 +61,8 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; }
 head -c 10 fifo > out & pid=$!
 
 # Trigger large mem allocation failure
-( trap '' PIPE && ulimit -v $vm && env $prog %20000000f 0 2>err-msg > fifo )
+( trap '' PIPE && ulimit -v $(($vm+4000)) &&
+  env $prog %20000000f 0 2>err-msg > fifo )
 exit=$?
 
 # Map this longer, and rarer, diagnostic to the common one.