Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2012 05:29:49 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Giovanni Trematerra <gianni@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Konstantin Belousov <kib@FreeBSD.org>, davidxu@FreeBSD.org, svn-src-head@FreeBSD.org, bde@FreeBSD.org
Subject:   Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys
Message-ID:  <20120802051805.P3345@besplex.bde.org>
In-Reply-To: <CACfq091K=1DUOee4LorPPSoEV8KnT570GGXDA01mHDrV12kKiQ@mail.gmail.com>
References:  <201207310548.q6V5mZHf091624@svn.freebsd.org> <CACfq090si0g7QG9UR%2Bmb%2BO5M4KH0=WPfWnF5NzZjYzKBp8hQ5Q@mail.gmail.com> <50179581.9070805@gmail.com> <CACfq091K=1DUOee4LorPPSoEV8KnT570GGXDA01mHDrV12kKiQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Aug 2012, Giovanni Trematerra wrote:

> On Tue, Jul 31, 2012 at 10:21 AM, David Xu <listlog2011@gmail.com> wrote:
>> ...
>> The old code broke some history semantic of FIFO pipe, you can try the test
>> tool /usr/src/tools/regression/poll/pipepoll, try it before and after my
>> commit, also compare the result with 8.3-STABLE, without this commit,
>> both sub-tests 6c and 6d failed.
>
> This is on Vanilla 9.0-RELEASE where new fifo implementation weren't backported
>
> FreeBSD bombay 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Tue Dec 27 21:59:00
> UTC 2011     root@build9x64.pcbsd.org:/usr/obj/builds/i386/pcbsd-build90/fbsd-source/9.0/sys/GENERIC
> i386
>
> [gianni@bombay] /usr/src/tools/regression/poll#./pipepoll
> 1..20
> not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN | POLLHUP
> not ok 18 FIFO state 6b: poll result 0 expected 1. expected POLLHUP; got 0
> not ok 19 FIFO state 6c: expected POLLHUP; got POLLIN | POLLHUP
> not ok 20 FIFO state 6d: expected POLLHUP; got POLLIN | POLLHUP
>
> As you can see, sub-tests 6c and 6d failed too on 9. So it's not a problem with
> new code though is irrelevant wrt the commit.

The failure is very differnt.  Failure to clear POLLIN in 6a, 6c and 6d
is a normal bug in FreeBSD.  Failure to set POLLHUP is apparently a normal
bug in FreeBSD (I didn't know about this one).  But now, POLLHUP isn't
set for 6c or 6d, and consequentially, POLLIN isn't set either.  The
behaviour is strangely version-depending:

- FreeBSD-9 (ref9-amd64):              as above (select 6c and 6d pass)
- FreeBSD-10 (ref10-amd64 Feb 19 2012): as above
- FreeBSD-10 (ref10-i386 Jul 10 2012):
not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN | POLLHUP
not ok 18 FIFO state 6b: poll result 0 expected 1. expected POLLHUP; got 0
not ok 19 FIFO state 6c: poll result 0 expected 1. expected POLLHUP; got 0
not ok 20 FIFO state 6d: poll result 0 expected 1. expected POLLHUP; got 0

Actually, this is not strange.  The difference between the FreeBSD-10's
sys_pipe.c is your new pipe implementation.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120802051805.P3345>