]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vsock/test: Adapt send_byte()/recv_byte() to handle MSG_ZEROCOPY
authorMichal Luczaj <mhal@rbox.co>
Thu, 19 Dec 2024 09:49:31 +0000 (10:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Dec 2024 18:28:01 +0000 (10:28 -0800)
commitf52e7f593b49344b9497c289cbb2ada213f60a7a
tree1398afcaf8e3fb73a72a8dff09625414ee6a4854
parent50f9434463a0be5b972ee442ba6a9704c9afb02a
vsock/test: Adapt send_byte()/recv_byte() to handle MSG_ZEROCOPY

For a zerocopy send(), buffer (always byte 'A') needs to be preserved (thus
it can not be on the stack) or the data recv()ed check in recv_byte() might
fail.

While there, change the printf format to 0x%02x so the '\0' bytes can be
seen.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-4-a416e554d9d7@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/vsock/util.c