]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: allow non-inotify tailf to keep up
authorAndreas Henriksson <andreas@fatal.se>
Sat, 26 Jul 2014 20:44:01 +0000 (22:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 29 Jul 2014 10:18:22 +0000 (12:18 +0200)
When tailf is not using inotify, it seems to sleep for 0.25s between
checks. Just giving a 0.1s time window between update and removal of the
input file thus gives little chance for tailf to succeed.
Similar between startup and append to file, make sure initial
content is read before appending additional data by bumping the time.

This should possibly be bumped much larger to make sure that
the tailf process actually gets a chance to run at all in the
given time window. Otherwise it might fail on really slow/overloaded
machines.
The drawback would then ofcourse be to increase the time it takes
to run the testsuite.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
tests/ts/tailf/simple

index 955844d1c8e477fbc4933eecfe718ad57429da61..d0a1c5cedec16e8176e573ae96859c316b6c0e43 100755 (executable)
@@ -27,9 +27,9 @@ echo {a..z} > $INPUT
 
 $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
 
-sleep 0.1
+sleep 0.5
 echo {0..9} >> $INPUT
-sleep 0.1
+sleep 0.5
 
 rm -f $INPUT