Date: Thu, 12 Jan 2012 09:55:44 +0100 From: Giovanni Trematerra <gianni@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: jilles@freebsd.org, Attilio Rao <attilio@freebsd.org>, flo@freebsd.org, Konstantin Belousov <kib@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: pipe/fifo code merged. Message-ID: <CACfq091z6wUG_ApKhfk%2BuDw7=te6ucjXQnkzWEjGnR0pAUzbCg@mail.gmail.com> In-Reply-To: <CACfq091AT7OP6Bxd3g5me8=HR%2BykUrVA4zEaBw8qtBxb9Ue1fQ@mail.gmail.com> References: <CACfq093o9iVZKxCj58OR2hpCLDYTUTdxg_re_bEMYn2SrNrLCQ@mail.gmail.com> <20120110005155.S2378@besplex.bde.org> <CACfq09225iMYLe6p8jSiVhsDw_rqTyEHsvPdtZXLrQYT0-skzg@mail.gmail.com> <20120110153807.H943@besplex.bde.org> <CACfq091AT7OP6Bxd3g5me8=HR%2BykUrVA4zEaBw8qtBxb9Ue1fQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 11, 2012 at 12:04 AM, Giovanni Trematerra <gianni@freebsd.org> wrote: > On Tue, Jan 10, 2012 at 10:41 AM, Bruce Evans <brde@optusnet.com.au> wrot= e: >> On Mon, 9 Jan 2012, Giovanni Trematerra wrote: >> >>> On Mon, Jan 9, 2012 at 3:34 PM, Bruce Evans <brde@optusnet.com.au> wrot= e: >>>> >>>> [skip] > >> >> In this file, I have most experience fixing this function (and open >> and close so that select and poll work). =A0The above looks simple, but >> has a complex interaction with layers above and below it. =A0Most of the >> details are in the socket layer. =A0You had to reimplement these in the >> pipe layer. =A0The most delicate point involving fs_wgen seems to be >> reimplemented correctly in fifo_iseof(). =A0Before I fixed this for >> fifos, poll and select on pipes (especially for EOF) was less broken >> than for fifos, partly because pipes are simpler -- they can't be >> reopened. =A0My tests in /usr/src/tools/regression/poll/ are hopefully >> enough to detect any regressions. =A0Some of the tests are intentionally >> left broken and/or expected to fail, to be bug for bug compatible with >> old kernel bugs. >> > > ok. I'll try that regression test > Hi Bruce, thanks again to point me out those regression tests I missed in first place= . I ran those tests and results were identical with patched and non patched kernel. So at least in that regard the patch doesn't introduce more regressions. There are some tests that fail. If you and others think it's worth to fix them I can take this on. -- Gianni 10.0-CURRENT PATCHED [gianni@devbox: poll]% ./pipepoll 1..20 ok 1 Pipe state 4: expected 0; got 0 ok 2 Pipe state 5: expected POLLIN; got POLLIN ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP not ok 4 Pipe state 6a: expected POLLHUP; got POLLIN | POLLHUP ok 5 Sock state 4: expected 0; got 0 ok 6 Sock state 5: expected POLLIN; got POLLIN ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP not ok 8 Sock state 6a: expected POLLHUP; got POLLIN | POLLHUP ok 9 FIFO state 0: expected 0; got 0 ok 10 FIFO state 1: expected 0; got 0 ok 11 FIFO state 2: expected POLLIN; got POLLIN ok 12 FIFO state 2a: expected 0; got 0 not ok 13 FIFO state 3: expected POLLHUP; got POLLIN | POLLHUP ok 14 FIFO state 4: expected 0; got 0 ok 15 FIFO state 5: expected POLLIN; got POLLIN ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP 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 [gianni@devbox: poll]% ./pipeselect 1..20 ok 1 Pipe state 4: expected clear; got clear ok 2 Pipe state 5: expected set; got set ok 3 Pipe state 6: expected set; got set ok 4 Pipe state 6a: expected set; got set ok 5 Sock state 4: expected clear; got clear ok 6 Sock state 5: expected set; got set ok 7 Sock state 6: expected set; got set ok 8 Sock state 6a: expected set; got set not ok 9 FIFO state 0: expected set; got clear ok 10 FIFO state 1: expected clear; got clear ok 11 FIFO state 2: expected set; got set ok 12 FIFO state 2a: expected clear; got clear ok 13 FIFO state 3: expected set; got set ok 14 FIFO state 4: expected clear; got clear ok 15 FIFO state 5: expected set; got set ok 16 FIFO state 6: expected set; got set ok 17 FIFO state 6a: expected set; got set not ok 18 FIFO state 6b: expected set; got clear ok 19 FIFO state 6c: expected set; got set ok 20 FIFO state 6d: expected set; got set STOCK KERNEL 10.0-CURRENT [gianni@devbox: poll]% ./pipepoll 1..20 ok 1 Pipe state 4: expected 0; got 0 ok 2 Pipe state 5: expected POLLIN; got POLLIN ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP not ok 4 Pipe state 6a: expected POLLHUP; got POLLIN | POLLHUP ok 5 Sock state 4: expected 0; got 0 ok 6 Sock state 5: expected POLLIN; got POLLIN ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP not ok 8 Sock state 6a: expected POLLHUP; got POLLIN | POLLHUP ok 9 FIFO state 0: expected 0; got 0 ok 10 FIFO state 1: expected 0; got 0 ok 11 FIFO state 2: expected POLLIN; got POLLIN ok 12 FIFO state 2a: expected 0; got 0 not ok 13 FIFO state 3: expected POLLHUP; got POLLIN | POLLHUP ok 14 FIFO state 4: expected 0; got 0 ok 15 FIFO state 5: expected POLLIN; got POLLIN ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP 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 [gianni@devbox: poll]% ./pipeselect 1..20 ok 1 Pipe state 4: expected clear; got clear ok 2 Pipe state 5: expected set; got set ok 3 Pipe state 6: expected set; got set ok 4 Pipe state 6a: expected set; got set ok 5 Sock state 4: expected clear; got clear ok 6 Sock state 5: expected set; got set ok 7 Sock state 6: expected set; got set ok 8 Sock state 6a: expected set; got set not ok 9 FIFO state 0: expected set; got clear ok 10 FIFO state 1: expected clear; got clear ok 11 FIFO state 2: expected set; got set ok 12 FIFO state 2a: expected clear; got clear ok 13 FIFO state 3: expected set; got set ok 14 FIFO state 4: expected clear; got clear ok 15 FIFO state 5: expected set; got set ok 16 FIFO state 6: expected set; got set ok 17 FIFO state 6a: expected set; got set not ok 18 FIFO state 6b: expected set; got clear ok 19 FIFO state 6c: expected set; got set ok 20 FIFO state 6d: expected set; got set
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACfq091z6wUG_ApKhfk%2BuDw7=te6ucjXQnkzWEjGnR0pAUzbCg>