test/vsock: add ioctl unsent bytes test
authorLuigi Leonardi <luigi.leonardi@outlook.com>
Tue, 30 Jul 2024 19:43:08 +0000 (21:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Aug 2024 08:20:28 +0000 (09:20 +0100)
commit18ee44ce97c18ee72f5807140d07ff8cebe3cab5
treebed6f1d43b4e565cda910594fac8835701c715f0
parente6ab45005772014ce49a693a63f928203c0cbbb0
test/vsock: add ioctl unsent bytes test

Introduce two tests, one for SOCK_STREAM and one for SOCK_SEQPACKET,
which use SIOCOUTQ ioctl to check that the number of unsent bytes is
zero after delivering a packet.

vsock_connect and vsock_accept are no longer static: this is to
create more generic tests, allowing code to be reused for SEQPACKET
and STREAM.

Signed-off-by: Luigi Leonardi <luigi.leonardi@outlook.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/vsock/util.c
tools/testing/vsock/util.h
tools/testing/vsock/vsock_test.c