test/vsock: Add ioctl SIOCINQ tests
authorXuewei Niu <niuxuewei.nxw@antgroup.com>
Tue, 8 Jul 2025 06:36:14 +0000 (14:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 02:29:52 +0000 (19:29 -0700)
commit613165683d344801c1d11fcacda6733f3b679e51
treeedb02470822b8d7d05cb424c4cb1d8274d04f90b
parent53548d6bffacc610ee883d3c0e99eb476fb606d3
test/vsock: Add ioctl SIOCINQ tests

Add SIOCINQ ioctl tests for both SOCK_STREAM and SOCK_SEQPACKET.

The client waits for the server to send data, and checks if the SIOCINQ
ioctl value matches the data size. After consuming the data, the client
checks if the SIOCINQ value is 0.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Link: https://patch.msgid.link/20250708-siocinq-v6-4-3775f9a9e359@antgroup.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/vsock/vsock_test.c