summaryrefslogtreecommitdiffstats
path: root/tools/testing/vsock/util.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2019-12-18 19:07:03 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-20 21:09:21 -0800
commit092f32ae628ed4874caf349cc0cfa0626cc3c5b0 (patch)
tree3010c94e4a2c20438d1eab4f0362c3d7ac5c57a9 /tools/testing/vsock/util.h
parent2f65b44e199c6521be8dbc7458250c74a86ce2aa (diff)
downloadlinux-092f32ae628ed4874caf349cc0cfa0626cc3c5b0.tar.bz2
VSOCK: add send_byte()/recv_byte() test utilities
Test cases will want to transfer data. This patch adds utility functions to do this. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/vsock/util.h')
-rw-r--r--tools/testing/vsock/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h
index 1786305cfddd..4df12e4b5ebe 100644
--- a/tools/testing/vsock/util.h
+++ b/tools/testing/vsock/util.h
@@ -36,6 +36,8 @@ unsigned int parse_cid(const char *str);
int vsock_stream_connect(unsigned int cid, unsigned int port);
int vsock_stream_accept(unsigned int cid, unsigned int port,
struct sockaddr_vm *clientaddrp);
+void send_byte(int fd, int expected_ret, int flags);
+void recv_byte(int fd, int expected_ret, int flags);
void run_tests(const struct test_case *test_cases,
const struct test_opts *opts);