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

Re: diffutils FTBFS on ppc64el



On Sun, Jan 08, 2017 at 11:13:40PM +0100, Christoph Biedl wrote:
> Aurelien Jarno wrote...
> 
> > > FAIL: colors
> > > ============
> > >
> > > diff: standard output: Broken pipe
> > > FAIL colors (exit status: 1)
> 
> This is the related code:
> 
> | mkfifo fifo
> | printf '%*s-a' 1000000 > a
> | printf '%*s-b' 1000000 > b
> | head -c 10 < fifo > /dev/null &
> + diff --color=always ---presume-output-tty a b > fifo
> | test $? = 141 || fail=1
> 
> There is a race condition involved, it fails in about three of
> four attempts - but not at all if the test is run under strace.
> 
> A "sleep 0.1" before the diff made the test pass in ten of ten
> attempts. So the reason might indeed be the head command hasn't opened
> fifo yet by the time diff tries to write to it. But this shouldn't be
> restricted to ppc64el. Someone got a super-fast amd64 to try there?

Are you sure we need a super-fast computer and not a super-slow one?

We would need either the diff line to be fast, or alternatively the head line
to be slow, right?

Anyway, I'll forward this upstream and will add an extremely
conservative "sleep 1".

Thanks a lot!


Reply to: