On 10/01/16 00:56, Bernhard Voelker wrote:
> At least the false positive in tail-2/follow-stdin.sh could be seen
> on a 4-core i5 system with -j8.  Fix similar cases. too.
> 
> * tests/tail-2/follow-stdin.sh: Empty the 'out' file in each iteration.
> Otherwise, under heavy system load, 'check_tail_output' would see the
> expected output from the previous round before tail would have the
> chance to come up in the background.

Nice. Yes the fork (clone) happens before the open (O_TRUNC):
  strace -f sh -c '/bin/true > out & pid=$!'

> * tests/dd/stats.sh: Likewise
> * tests/misc/cat-buf.sh: Likewise.
> * tests/misc/stdbuf.sh: Likewise.

No race for these 3 due to explicit `wait`,
but better to make the change for consistency.

> * tests/tail-2/wait.sh

Yes this was racy too.

+1 to complete patch.

thanks,
Pádraig.


Reply via email to