vsock/test: add recv_buf() utility function
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 15 Sep 2023 12:14:48 +0000 (14:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Sep 2023 16:42:37 +0000 (17:42 +0100)
commita8ed71a27ef524c808b518031feac811ed3e741c
tree9ffcfb9ba8f645dc027c4ae9123daf1fd3bd9bc4
parent685c6d5b2ccbf2d93cbe580391f62ceaabf72f33
vsock/test: add recv_buf() utility function

Move the code of recv_byte() out in a new utility function that
can be used to receive a generic buffer.

This new function can be used when we need to receive a custom
buffer and not just a single 'A' byte.

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/util.c
tools/testing/vsock/util.h