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

Re: diffutils FTBFS on ppc64el

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?


Attachment: signature.asc
Description: Digital signature

Reply to: