On Wed, 1 Aug 2012, Giovanni Trematerra wrote:

On Tue, Jul 31, 2012 at 10:21 AM, David Xu <listlog2...@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     
r...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to