diff options
author | Konstantin Shkolnyy <kshk@linux.ibm.com> | 2025-05-07 10:14:56 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-13 15:01:50 -0700 |
commit | 7fd7ad6f36af36f30a06d165eff3780cb139fa79 (patch) | |
tree | e3d8179c036d92bcf6d8e725c5b3f87582716cc4 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 396786af1cea5ca1c041f113a6002d62f277ccb0 (diff) |
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 <kshk@linux.ibm.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Fixes: 18ee44ce97c1 ("test/vsock: add ioctl unsent bytes test")
Link: https://patch.msgid.link/20250507151456.2577061-1-kshk@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions