summaryrefslogtreecommitdiff
path: root/tools/testing/vsock/util.h
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2025-01-28 16:15:30 +0300
committerJakub Kicinski <kuba@kernel.org>2025-01-30 05:50:37 +0300
commitac12b7e2912d60fceefaacc78ee8b5aec8b51c04 (patch)
tree8c7206b5ba9e724bd7e0d2882dcce92b0b867c25 /tools/testing/vsock/util.h
parent852a00c4281d3c4cf82020421cc9b5b05d53e93f (diff)
downloadlinux-ac12b7e2912d60fceefaacc78ee8b5aec8b51c04.tar.xz
vsock/test: Introduce vsock_connect_fd()
Distill timeout-guarded vsock_connect_fd(). Adapt callers. Suggested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-4-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vsock/util.h')
-rw-r--r--tools/testing/vsock/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h
index 077842905bc3..d1f765ce3eee 100644
--- a/tools/testing/vsock/util.h
+++ b/tools/testing/vsock/util.h
@@ -39,6 +39,7 @@ struct test_case {
void init_signals(void);
unsigned int parse_cid(const char *str);
unsigned int parse_port(const char *str);
+int vsock_connect_fd(int fd, unsigned int cid, unsigned int port);
int vsock_connect(unsigned int cid, unsigned int port, int type);
int vsock_accept(unsigned int cid, unsigned int port,
struct sockaddr_vm *clientaddrp, int type);