From: Andreas Henriksson <andreas@fatal.se>
To: util-linux@vger.kernel.org
Cc: Andreas Henriksson <andreas@fatal.se>
Subject: [PATCH] tests: allow non-inotify tailf to keep up
Date: Sat, 26 Jul 2014 22:44:01 +0200 [thread overview]
Message-ID: <1406407441-4872-1-git-send-email-andreas@fatal.se> (raw)
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
next reply other threads:[~2014-07-26 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-26 20:44 Andreas Henriksson [this message]
2014-07-27 12:36 ` [PATCH] tests: allow non-inotify tailf to keep up Pádraig Brady
2014-07-28 11:59 ` Karel Zak
2014-07-28 12:21 ` Andreas Henriksson
2014-07-29 10:19 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406407441-4872-1-git-send-email-andreas@fatal.se \
--to=andreas@fatal.se \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox