vsock/test: use recv_buf() in vsock_test.c
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 15 Sep 2023 12:14:49 +0000 (14:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Sep 2023 16:42:37 +0000 (17:42 +0100)
commita0bcb83577165b0d6fb948c8ab207a1dd7146f6f
tree62f2c0ee6e94f8d50b12e55e2997ccf2b3ff0765
parenta8ed71a27ef524c808b518031feac811ed3e741c
vsock/test: use recv_buf() in vsock_test.c

We have a very common pattern used in vsock_test that we can
now replace with the new recv_buf().

This allows us to reuse the code we already had to check the
actual return value and wait for all bytes to be received with
an appropriate timeout.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/vsock/vsock_test.c