public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests: allow non-inotify tailf to keep up
@ 2014-07-26 20:44 Andreas Henriksson
  2014-07-27 12:36 ` Pádraig Brady
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Henriksson @ 2014-07-26 20:44 UTC (permalink / raw)
  To: util-linux; +Cc: Andreas Henriksson

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/ts/tailf/simple b/tests/ts/tailf/simple
index 955844d..d0a1c5c 100755
--- a/tests/ts/tailf/simple
+++ b/tests/ts/tailf/simple
@@ -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
 
-- 
2.0.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-29 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-26 20:44 [PATCH] tests: allow non-inotify tailf to keep up Andreas Henriksson
2014-07-27 12:36 ` Pádraig Brady
2014-07-28 11:59   ` Karel Zak
2014-07-28 12:21     ` Andreas Henriksson
2014-07-29 10:19       ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox