From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from smtprelay-b22.telenor.se ([195.54.99.213]:56848 "EHLO smtprelay-b22.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbaGZUoH (ORCPT ); Sat, 26 Jul 2014 16:44:07 -0400 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b22.telenor.se (Postfix) with ESMTP id 31922EC358 for ; Sat, 26 Jul 2014 22:44:04 +0200 (CEST) From: Andreas Henriksson To: util-linux@vger.kernel.org Cc: Andreas Henriksson Subject: [PATCH] tests: allow non-inotify tailf to keep up Date: Sat, 26 Jul 2014 22:44:01 +0200 Message-Id: <1406407441-4872-1-git-send-email-andreas@fatal.se> Sender: util-linux-owner@vger.kernel.org List-ID: 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 --- 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