aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/vsock/util.h
diff options
context:
space:
mode:
authorArseny Krasnov <arseny.krasnov@kaspersky.com>2021-06-11 14:14:04 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-11 13:32:47 -0700
commit41b792d7a86dd7fc77d5877e814d322e9f7efa75 (patch)
tree6ba5ed617b96eeb88bc126504bb13bdd2eb401ea /tools/testing/vsock/util.h
parentvsock/loopback: enable SEQPACKET for transport (diff)
downloadlinux-dev-41b792d7a86dd7fc77d5877e814d322e9f7efa75.tar.xz
linux-dev-41b792d7a86dd7fc77d5877e814d322e9f7efa75.zip
vsock_test: add SOCK_SEQPACKET tests
Implement two tests of SOCK_SEQPACKET socket: first sends data by several 'write()'s and checks that number of 'read()' were same. Second test checks MSG_TRUNC flag. Cases for connect(), bind(), etc. are not tested, because it is same as for stream socket. Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--tools/testing/vsock/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h
index e53dd09d26d9..a3375ad2fb7f 100644
--- a/tools/testing/vsock/util.h
+++ b/tools/testing/vsock/util.h
@@ -36,8 +36,11 @@ struct test_case {
void init_signals(void);
unsigned int parse_cid(const char *str);
int vsock_stream_connect(unsigned int cid, unsigned int port);
+int vsock_seqpacket_connect(unsigned int cid, unsigned int port);
int vsock_stream_accept(unsigned int cid, unsigned int port,
struct sockaddr_vm *clientaddrp);
+int vsock_seqpacket_accept(unsigned int cid, unsigned int port,
+ struct sockaddr_vm *clientaddrp);
void vsock_wait_remote_close(int fd);
void send_byte(int fd, int expected_ret, int flags);
void recv_byte(int fd, int expected_ret, int flags);