]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vsock/test: Introduce vsock_bind_try() helper
authorMichal Luczaj <mhal@rbox.co>
Wed, 11 Jun 2025 19:56:50 +0000 (21:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 21:50:27 +0000 (14:50 -0700)
commitd56a8dbff8fea1c644183e52a39b165757f7b151
tree05494e557ef8e5c4754bd4093c74ae9c736acd9b
parent0f0decc777d7ed4d7ba316a5f92495e38c6fc6b1
vsock/test: Introduce vsock_bind_try() helper

Create a socket and bind() it. If binding failed, gracefully return an
error code while preserving `errno`.

Base vsock_bind() on top of it.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Link: https://patch.msgid.link/20250611-vsock-test-inc-cov-v3-1-5834060d9c20@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/vsock/util.c
tools/testing/vsock/util.h