summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-02-02 10:47:48 +0000
committerPádraig Brady <P@draigBrady.com>2010-02-02 15:16:40 +0000
commitdd2253f49da057a677199b18b8673cc09bd1f2f5 (patch)
tree2402459625a21d4fc8719d91958144cd51403049 /tests/misc
parentf53a0e1062e251baf709552cdde73ce4f6ccf6fb (diff)
downloadcoreutils-dd2253f49da057a677199b18b8673cc09bd1f2f5.tar.xz
tests: fix various timeout races
Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/277485 * tests/misc/timeout: Set all expected timeouts to 1s and all unexpected timeouts to 10s. In this way, tests normally proceed quickly but may delay up to 10s before reporting failures. * tests/ls/infloop: Likewise. * tests/tail-2/pid: Likewise. * tests/tail-2/pipe-f: Likewise. * tests/tail-2/wait: Likewise. * tests/dd/skip-seek-past-dev: Likewise.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/timeout9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/misc/timeout b/tests/misc/timeout
index b61420e64..3bd3af39a 100755
--- a/tests/misc/timeout
+++ b/tests/misc/timeout
@@ -24,7 +24,7 @@ fi
. $srcdir/test-lib.sh
# no timeout
-timeout 1 true || fail=1
+timeout 10 true || fail=1
# no timeout (suffix check)
timeout 1d true || fail=1
@@ -33,12 +33,11 @@ timeout 1d true || fail=1
timeout 0 true || fail=1
# exit status propagation
-timeout 1 false && fail=1
-timeout 1 sh -c 'exit 2'
+timeout 10 sh -c 'exit 2'
test $? = 2 || fail=1
# timeout
-timeout 1 sleep 2
+timeout 1 sleep 10
test $? = 124 || fail=1
# Ensure `timeout` is immune to parent's SIGCHLD handler
@@ -47,7 +46,7 @@ test $? = 124 || fail=1
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
sig=`"$abs_top_builddir/src/kill" -l CHLD 2>/dev/null` && trap '' $sig
- exec timeout 1 true
+ exec timeout 10 true
) || fail=1
Exit $fail