From: Pádraig Brady Date: Sat, 5 Apr 2025 10:27:32 +0000 (+0100) Subject: maint: adjustments to recent timeout change X-Git-Tag: v9.7~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4368d21fbddaf5397087210c49b398414e02c933;p=thirdparty%2Fcoreutils.git maint: adjustments to recent timeout change * .gitignore: Add /lib/fenv.h to ignore list. * tests/timeout/timeout-parameters.sh: Use a sleep length of 10s to be consistent with the pattern where we use this larger time when it does not slow down a test, but also provides protection against a hung test, and better avoidance of false failures due to races on very loaded systems. Also fix the setting of FAIL. * tests/timeout/timeout-large-parameters.sh: Remove duplicated test. --- diff --git a/.gitignore b/.gitignore index f4a17ad044..4dc39ae551 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ /lib/errno.h /lib/error.h /lib/fcntl.h +/lib/fenv.h /lib/float.h /lib/fnmatch.h /lib/getopt-cdefs.h diff --git a/tests/timeout/timeout-large-parameters.sh b/tests/timeout/timeout-large-parameters.sh index a5395d153f..5669810e8a 100755 --- a/tests/timeout/timeout-large-parameters.sh +++ b/tests/timeout/timeout-large-parameters.sh @@ -43,7 +43,4 @@ timeout 2.34e+5d sleep 0 || fail=1 timeout $LDBL_MAX sleep 0 || fail=1 returns_ 125 timeout -- -$LDBL_MAX sleep 0 || fail=1 -# Ensure underflow times out immediately -returns_ 124 timeout 1e-5000 sleep 10 || fail=1 - Exit $fail diff --git a/tests/timeout/timeout-parameters.sh b/tests/timeout/timeout-parameters.sh index 4088462622..c4b2202b41 100755 --- a/tests/timeout/timeout-parameters.sh +++ b/tests/timeout/timeout-parameters.sh @@ -41,7 +41,7 @@ timeout 10.34 sleep 0 || fail=1 timeout 9.999999999 sleep 0 || fail=1 # round underflow up to 1 ns -returns_ 124 timeout 1e-10000 sleep 1 || fail +returns_ 124 timeout 1e-10000 sleep 10 || fail=1 # invalid signal spec returns_ 125 timeout --signal=invalid 1 sleep 0 || fail=1