Module Name: src Committed By: martin Date: Mon Oct 4 14:32:38 UTC 2021
Modified Files: src/sys/kern [netbsd-9]: uipc_syscalls.c src/sys/miscfs/fifofs [netbsd-9]: fifo_vnops.c src/tests/lib/libc/sys [netbsd-9]: t_poll.c Log Message: Pull up following revision(s) (requested by thorpej in ticket #1351): sys/miscfs/fifofs/fifo_vnops.c: revision 1.88 sys/kern/uipc_syscalls.c: revision 1.201 tests/lib/libc/sys/t_poll.c: revision 1.6 tests/lib/libc/sys/t_poll.c: revision 1.7 tests/lib/libc/sys/t_poll.c: revision 1.8 - Strenghen the poll(2) fifo_inout test to ensure that once the reader has read enough that exactly PIPE_BUF space is available that the FIFO becomes writable again. - When creating a FIFO, ensure that the receive low water mark is 1 (a FIFO must be readable when at least 1 byte is available); this was already the case implicitly, but this makes it explicit. - Similarly, set the send low water mark to PIPE_BUF to ensure that the pipe is writable when at least PIPE_BUF bytes of space are available in the send buffer. Without this change, the strengthened test case above does not pass (the default send low water mark is larger than PIPE_BUF; see soreserve()). - Make the same low water mark changes to the PIPE_SOCKETPAIR case. In the fifo_hup1 test, also ensure that POLLHUP is de-asserted when a new writer appears. Add a fifo_inout test case that validates the expected POLLIN / POLLOUT behavior for FIFOs: - A FIFO is readable so long as at least 1 byte is available. - A FIFO is writable so long as at least PIPE_BUF (obtained with _PC_PIPE_BUF) space is avaiable. This will be cloned for a forthcoming kevent test case. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.199.4.1 src/sys/kern/uipc_syscalls.c cvs rdiff -u -r1.79.8.1 -r1.79.8.2 src/sys/miscfs/fifofs/fifo_vnops.c cvs rdiff -u -r1.3.34.1 -r1.3.34.2 src/tests/lib/libc/sys/t_poll.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.