diff options
author | Pádraig Brady <P@draigBrady.com> | 2010-02-02 10:47:48 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-02-02 15:16:40 +0000 |
commit | dd2253f49da057a677199b18b8673cc09bd1f2f5 (patch) | |
tree | 2402459625a21d4fc8719d91958144cd51403049 /tests/tail-2 | |
parent | f53a0e1062e251baf709552cdde73ce4f6ccf6fb (diff) | |
download | coreutils-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/tail-2')
-rwxr-xr-x | tests/tail-2/pid | 4 | ||||
-rwxr-xr-x | tests/tail-2/pipe-f | 2 | ||||
-rwxr-xr-x | tests/tail-2/wait | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/tail-2/pid b/tests/tail-2/pid index 53f9191e8..b1286df05 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -42,13 +42,13 @@ for inotify in ---disable-inotify ''; do # Ensure that tail --pid=PID exits with success status when PID is dead. # Use an unlikely-to-be-live PID - timeout 3 tail -f -s.1 --pid=$PID_T_MAX $inotify empty + timeout 10 tail -f -s.1 --pid=$PID_T_MAX $inotify empty ret=$? test $ret = 124 && skip_test_ "pid $PID_T_MAX present or tail too slow" test $ret = 0 || fail=1 # Ensure tail doesn't wait for data when PID is dead - timeout 3 tail -f -s10 --pid=$PID_T_MAX $inotify empty + timeout 10 tail -f -s10 --pid=$PID_T_MAX $inotify empty test $? = 124 && fail=1 done diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f index d557f9704..bf38c183c 100755 --- a/tests/tail-2/pipe-f +++ b/tests/tail-2/pipe-f @@ -23,7 +23,7 @@ fi . $srcdir/test-lib.sh -echo foo | timeout 2 tail -f -c3 > out || fail=1 +echo foo | timeout 10 tail -f -c3 > out || fail=1 echo oo > exp || fail=1 compare out exp || fail=1 diff --git a/tests/tail-2/wait b/tests/tail-2/wait index 7b3fa82da..5c9eff0a2 100755 --- a/tests/tail-2/wait +++ b/tests/tail-2/wait @@ -30,11 +30,11 @@ touch k || framework_failure for inotify in ---disable-inotify ''; do - timeout 1 tail -s0.1 -f $inotify not_here + timeout 10 tail -s0.1 -f $inotify not_here test $? = 124 && fail=1 if test ! -r unreadable; then # can't test this when root - timeout 1 tail -s0.1 -f $inotify unreadable + timeout 10 tail -s0.1 -f $inotify unreadable test $? = 124 && fail=1 fi |