HomeFreeBSD

socket tests: add listener_wakeup

Description

socket tests: add listener_wakeup

This test runs several scenarios when sleep(9) on a listen(2)ing socket is
interrupted by shutdown(2) or by close(2). What should happen in that
case is not specified, neither is documented. However, there is certain
behavior that we have and this test makes sure it is preserved. There is
software that relies on it, see bug 227259. This test is based on
submission with this bug, bugzilla attachment 192260.

The test checks TCP and unix(4) stream socket behavior and SCTP can be
added easily if needed.

The test passes on FreeBSD 11 to 15. It won't pass on FreeBSD 10,
although the wakeup behavior of shutdown(2) is the same, but it doesn't
return error.

PR: 227259

Details

Provenance
glebiusAuthored on Feb 15 2024, 6:48 PM
Parents
rGabe8379b4f24: sockets: repair wakeup of accept(2) by shutdown(2)
Branches
Unknown
Tags
Unknown