Re: [PATCH 6.12 094/169] vsock/test: fix seqpacket message bounds test

Stefano Garzarella
2026-02-11T08:31:01Z

On Wed, Feb 11, 2026 at 08:50:11AM +0100, Johan Korsnes wrote:
>On 28/01/2026 16:22, Greg Kroah-Hartman wrote:
>> 6.12-stable review patch. If anyone has any objections, please let me know.
>>
>> ------------------
>>
>> From: Stefano Garzarella <sgarzare@redhat.com>
>>
>> [ Upstream commit 0a98de80136968bab7db37b16282b37f044694d3 ]
>>
>> The test requires the sender (client) to send all messages before waking
>> up the receiver (server).
>> Since virtio-vsock had a bug and did not respect the size of the TX
>> buffer, this test worked, but now that we are going to fix the bug, the
>> test hangs because the sender would fill the TX buffer before waking up
>> the receiver.
>>
>> Set the buffer size in the sender (client) as well, as we already do for
>> the receiver (server).
>>
>> Fixes: 5c338112e48a ("test/vsock: rework message bounds test")
>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>> Link: https://patch.msgid.link/20260121093628.9941-3-sgarzare@redhat.com
>> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> tools/testing/vsock/vsock_test.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
>> index 0c22ff7a8de2a..79ef11c0ab14f 100644
>> --- a/tools/testing/vsock/vsock_test.c
>> +++ b/tools/testing/vsock/vsock_test.c
>> @@ -359,6 +359,7 @@ static void test_stream_msg_peek_server(const struct test_opts *opts)
>>
>> static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
>> {
>> + unsigned long long sock_buf_size;
>> unsigned long curr_hash;
>> size_t max_msg_size;
>> int page_size;
>> @@ -371,6 +372,16 @@ static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
>> exit(EXIT_FAILURE);
>> }
>>
>> + sock_buf_size = SOCK_BUF_SIZE;
>> +
>> + setsockopt_ull_check(fd, AF_VSOCK, SO_VM_SOCKETS_BUFFER_MAX_SIZE,
>> + sock_buf_size,
>> + "setsockopt(SO_VM_SOCKETS_BUFFER_MAX_SIZE)");
>
>Hi Greg,
>
>This patch causes build failure as the setsockopt_ull_check() function
>does not seem to be defined in the 6.12 tree.

I guess just when you build vsock_test, right?

BTW to fix that we should backport commit 86814d8ffd55 ("vsock/test:
verify socket options after setting them").

I tried to cherry-pick it on current linux-6.12.y and apply clean.

Greg, let me know if I should send a proper patch for 6.12.

Thanks,
Stefano