Source-Changes archive

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

CVS commit: src/tests/kernel/kqueue/write



Module Name:    src
Committed By:   riastradh
Date:           Sat Oct  3 21:06:05 UTC 2026

Modified Files:
        src/tests/kernel/kqueue/write: t_pipe.c

Log Message:
kqueue/kernel/t_pipe: Fix newly failing test.

If the read side of a pipe has been closed, then for the write side:
- poll will set POLLOUT, not POLLNVAL (nor fail with EBADF), and
- select will report writable, not fail with EBADF,
because the write side is immediately writable and will fail with
EPIPE/SIGPIPE -- it won't block if you try to write.

So surely kqueue with EVFILT_WRITE should simply report immediately
writable too, not fail with EBADF.  And that is what I caused to
happen by simplifying and clarifying the code and fixing various edge
cases.  (The bad response that this test was added to check is a
kernel crash on null pointer dereference; that, fortunately, has not
regressed.)

PR kern/59056: poll POLLHUP bugs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/kqueue/write/t_pipe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index