bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coreutils 5.2.1: race in testsuite


From: Jim Meyering
Subject: Re: Coreutils 5.2.1: race in testsuite
Date: Wed, 24 Mar 2004 13:14:55 +0100

Andreas Schwab <address@hidden> wrote:
>> What was the symptom of the failure?
>
> Tail reports an error opening foo.
>
> + cat err
> ==> a <==
>
> ==> foo <==
> tail: foo: No such file or directory

Ahhh.  I see how it happens, now.
I'm applying the following slightly different patch.
Thanks again.

Index: tests/tail-2/assert
===================================================================
RCS file: /fetish/cu/tests/tail-2/assert,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -u -r1.4 -r1.5
--- tests/tail-2/assert 6 Jan 2000 16:01:43 -0000       1.4
+++ tests/tail-2/assert 24 Mar 2004 12:13:12 -0000      1.5
@@ -30,9 +30,15 @@ tail --follow=name a foo > err 2>&1 &
 tail_pid=$!
 # Arrange for the tail process to die after 12 seconds.
 (sleep 12; kill $tail_pid) &
-rm -f foo
+
 echo sleeping for 7 seconds...
-sleep 7
+
+# Give the backgrounded `tail' a chance to start before removing foo.
+# Otherwise, without --retry, tail wouldn't try to open `foo' again.
+sleep 1
+
+rm -f foo
+sleep 6
 echo $ok > f
 mv f foo
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]