From dd2253f49da057a677199b18b8673cc09bd1f2f5 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 2 Feb 2010 10:47:48 +0000 Subject: 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. --- tests/misc/timeout | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/misc/timeout') 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 -- cgit v1.2.3-70-g09d2