svn commit: r238936 - in head/sys: fs/fifofs kern sys

David Xu listlog2011 at gmail.com
Thu Aug 2 03:01:45 UTC 2012


On 2012/8/2 3:29, Bruce Evans wrote:
> On Wed, 1 Aug 2012, Giovanni Trematerra wrote:
>
>> On Tue, Jul 31, 2012 at 10:21 AM, David Xu <listlog2011 at 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 at build9x64.pcbsd.org:/usr/obj/builds/i386/pcbsd-build90/fbsd-source/9.0/sys/GENERIC
>> i386
>>
>> [gianni at 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.

I have attached a patch to fix it, it should make the regression tool happy.
Is it worth to commit ?

-------------- next part --------------
Index: sys_pipe.c
===================================================================
--- sys_pipe.c	(revision 238936)
+++ sys_pipe.c	(working copy)
@@ -1447,7 +1447,6 @@
 
 	if ((events & POLLINIGNEOF) == 0) {
 		if (rpipe->pipe_state & PIPE_EOF) {
-			revents |= (events & (POLLIN | POLLRDNORM));
 			if (wpipe->pipe_present != PIPE_ACTIVE ||
 			    (wpipe->pipe_state & PIPE_EOF))
 				revents |= POLLHUP;


More information about the svn-src-all mailing list