Module Name: src Committed By: rin Date: Fri Aug 23 07:13:50 UTC 2024
Modified Files: src/tests/kernel/kqueue: t_empty.c src/tests/net/net: t_tcp.c Log Message: tests: Fix false positives due to race b/w connect(2) and accept(2) For kernel/kqueue/t_empty and net/net/t_tcp, there were no sync ops b/w connect(2) and accept(2) for non-blocking socket pair on host (rump is not used). As a result, accept(2) can fail immediately with EAGAIN, when kernel-side routines for connect(2) and accept(2) are processed in different CPU cores. 1-sec sleep(3) between two syscalls seems to mitigate this problem as far as I can see, although this should not be a perfect solution... Thanks ozaki-r@ for discussion. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/kqueue/t_empty.c cvs rdiff -u -r1.12 -r1.13 src/tests/net/net/t_tcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.