aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorKonstantin Shkolnyy <[email protected]>2025-05-07 15:14:56 +0000
committerJakub Kicinski <[email protected]>2025-05-13 22:01:50 +0000
commit7fd7ad6f36af36f30a06d165eff3780cb139fa79 (patch)
treee3d8179c036d92bcf6d8e725c5b3f87582716cc4 /net/unix/af_unix.c
parenttools: ynl-gen: Allow multi-attr without nested-attributes again (diff)
downloadkernel-7fd7ad6f36af36f30a06d165eff3780cb139fa79.tar.gz
kernel-7fd7ad6f36af36f30a06d165eff3780cb139fa79.zip
vsock/test: Fix occasional failure in SIOCOUTQ tests
These tests: "SOCK_STREAM ioctl(SIOCOUTQ) 0 unsent bytes" "SOCK_SEQPACKET ioctl(SIOCOUTQ) 0 unsent bytes" output: "Unexpected 'SIOCOUTQ' value, expected 0, got 64 (CLIENT)". They test that the SIOCOUTQ ioctl reports 0 unsent bytes after the data have been received by the other side. However, sometimes there is a delay in updating this "unsent bytes" counter, and the test fails even though the counter properly goes to 0 several milliseconds later. The delay occurs in the kernel because the used buffer notification callback virtio_vsock_tx_done(), called upon receipt of the data by the other side, doesn't update the counter itself. It delegates that to a kernel thread (via vsock->tx_work). Sometimes that thread is delayed more than the test expects. Change the test to poll SIOCOUTQ until it returns 0 or a timeout occurs. Signed-off-by: Konstantin Shkolnyy <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Fixes: 18ee44ce97c1 ("test/vsock: add ioctl unsent bytes test") Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions