From: Karel Zak <kzak@redhat.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Andreas Henriksson <andreas@fatal.se>, util-linux@vger.kernel.org
Subject: Re: [PATCH] tests: allow non-inotify tailf to keep up
Date: Mon, 28 Jul 2014 13:59:23 +0200 [thread overview]
Message-ID: <20140728115923.GK8533@x2.net.home> (raw)
In-Reply-To: <53D4F231.9020906@draigBrady.com>
On Sun, Jul 27, 2014 at 01:36:01PM +0100, Pádraig Brady wrote:
> On 07/26/2014 09:44 PM, Andreas Henriksson wrote:
> > 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
>
> For such tests coreutils uses a helper function
> to apply a truncated exponential backoff,
> to run quickly in the common case, but also
> delay longer if necessary. See retry_delay_() at:
>
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=init.cfg;h=725ee121;hb=HEAD#l608
Andreas? (hint: send a new patch :-))
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2014-07-28 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20140728115923.GK8533@x2.net.home \
--to=kzak@redhat.com \
--cc=P@draigBrady.com \
--cc=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