History log of /src/tests/kernel/kqueue/t_empty.c |
Revision | | Date | Author | Comments |
1.2 |
| 23-Aug-2024 |
rin | 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.
|
1.1 |
| 23-Oct-2021 |
thorpej | branches: 1.1.2; Add support for the EVFILT_EMPTY filter, which is activated when the write buffer associated with the file descriptor is empty. This is currently implemented only for sockets, and is intended primarily to provide visibility to applications that all previously written data has been acknowledged by the TCP layer on the receiver. Compatible with the same filter in FreeBSD.
|
1.1.2.1 |
| 24-Aug-2024 |
martin | Pull up following revision(s) (requested by rin in ticket #813):
tests/kernel/kqueue/t_empty.c: revision 1.2 tests/net/net/t_tcp.c: revision 1.13
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.
|