aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2025-04-05 11:27:32 +0100
committerPádraig Brady <P@draigBrady.com>2025-04-05 11:37:58 +0100
commit4368d21fbddaf5397087210c49b398414e02c933 (patch)
treef4f57d491de5762c1af58d08bdebb90c24ce765e
parenttimeout: round timeouts up (diff)
downloadcoreutils-4368d21fbddaf5397087210c49b398414e02c933.tar.gz
coreutils-4368d21fbddaf5397087210c49b398414e02c933.zip
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.
-rw-r--r--.gitignore1
-rwxr-xr-xtests/timeout/timeout-large-parameters.sh3
-rwxr-xr-xtests/timeout/timeout-parameters.sh2
3 files changed, 2 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index f4a17ad04..4dc39ae55 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 a5395d153..5669810e8 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 408846262..c4b2202b4 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