diff options
author | Pádraig Brady <P@draigBrady.com> | 2016-01-18 12:41:36 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-01-18 15:32:17 +0000 |
commit | 3f02d93be21920299ba19e2dc93b3bcef6c9df81 (patch) | |
tree | 20e6413508e0243815f3ac516d1f88cb05e672aa /tests/tail-2 | |
parent | cc05c3c16d9eea8bb3918e6bd9892785291e7526 (diff) | |
download | coreutils-3f02d93be21920299ba19e2dc93b3bcef6c9df81.tar.xz |
tests: adjust delays to avoid false positives
* tests/rm/dangling-symlink.sh: The effective delay was only
1.5s. So delay before the operation, and increase the iteration
count by 1 to increase the delay to 6.3s. This failure was
noticed once on a FreeBSD 10.2 x86_64 virtual machine.
* tests/dd/stats.sh: Remove quotes on sleep argument
to ensure arguments are accumulated appropriately.
* tests/du/move-dir-while-traversing.sh: sleep before operation,
to increase the effective delay from 1.6s to 3.2s.
* tests/tail-2/flush-initial.sh: Likewise.
* tests/tail-2/pipe-f2.sh: Sleep first so that the effective delay
matches the commented value.
Diffstat (limited to 'tests/tail-2')
-rwxr-xr-x | tests/tail-2/flush-initial.sh | 5 | ||||
-rwxr-xr-x | tests/tail-2/pipe-f2.sh | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/tests/tail-2/flush-initial.sh b/tests/tail-2/flush-initial.sh index 630cc5fc8..803502ad7 100755 --- a/tests/tail-2/flush-initial.sh +++ b/tests/tail-2/flush-initial.sh @@ -34,9 +34,8 @@ tail $fastpoll -f in > out & pid=$! tail_flush() { local delay="$1" - - test -s out || - { sleep "$delay"; return 1; } + sleep $delay + test -s out } retry_delay_ tail_flush .1 5 || fail=1 diff --git a/tests/tail-2/pipe-f2.sh b/tests/tail-2/pipe-f2.sh index d91de5854..70fb3bdc1 100755 --- a/tests/tail-2/pipe-f2.sh +++ b/tests/tail-2/pipe-f2.sh @@ -32,11 +32,7 @@ fastpoll='-s.1 --max-unchanged-stats=1' timeout 10 tail $fastpoll -f fifo > out & pid=$! -check_tail_output() -{ - local n_sec="$1" - test -s out || { sleep $n_sec; return 1; } -} +check_tail_output() { sleep $1; test -s out; } # Wait 12.7s for tail to write something. retry_delay_ check_tail_output .1 7 || fail=1 |