Lines Matching refs:opts
31 static void test_stream_connection_reset(const struct test_opts *opts) in test_stream_connection_reset() argument
39 .svm_port = opts->peer_port, in test_stream_connection_reset()
40 .svm_cid = opts->peer_cid, in test_stream_connection_reset()
67 static void test_stream_bind_only_client(const struct test_opts *opts) in test_stream_bind_only_client() argument
75 .svm_port = opts->peer_port, in test_stream_bind_only_client()
76 .svm_cid = opts->peer_cid, in test_stream_bind_only_client()
109 static void test_stream_bind_only_server(const struct test_opts *opts) in test_stream_bind_only_server() argument
117 .svm_port = opts->peer_port, in test_stream_bind_only_server()
139 static void test_stream_client_close_client(const struct test_opts *opts) in test_stream_client_close_client() argument
143 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_client_close_client()
153 static void test_stream_client_close_server(const struct test_opts *opts) in test_stream_client_close_server() argument
157 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_client_close_server()
174 static void test_stream_server_close_client(const struct test_opts *opts) in test_stream_server_close_client() argument
178 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_server_close_client()
195 static void test_stream_server_close_server(const struct test_opts *opts) in test_stream_server_close_server() argument
199 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_server_close_server()
214 static void test_stream_multiconn_client(const struct test_opts *opts) in test_stream_multiconn_client() argument
220 fds[i] = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_multiconn_client()
238 static void test_stream_multiconn_server(const struct test_opts *opts) in test_stream_multiconn_server() argument
244 fds[i] = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_multiconn_server()
264 static void test_msg_peek_client(const struct test_opts *opts, in test_msg_peek_client() argument
272 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_msg_peek_client()
274 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_msg_peek_client()
291 static void test_msg_peek_server(const struct test_opts *opts, in test_msg_peek_server() argument
300 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_msg_peek_server()
302 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_msg_peek_server()
347 static void test_stream_msg_peek_client(const struct test_opts *opts) in test_stream_msg_peek_client() argument
349 return test_msg_peek_client(opts, false); in test_stream_msg_peek_client()
352 static void test_stream_msg_peek_server(const struct test_opts *opts) in test_stream_msg_peek_server() argument
354 return test_msg_peek_server(opts, false); in test_stream_msg_peek_server()
360 static void test_seqpacket_msg_bounds_client(const struct test_opts *opts) in test_seqpacket_msg_bounds_client() argument
368 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_msg_bounds_client()
430 static void test_seqpacket_msg_bounds_server(const struct test_opts *opts) in test_seqpacket_msg_bounds_server() argument
439 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_msg_bounds_server()
505 static void test_seqpacket_msg_trunc_client(const struct test_opts *opts) in test_seqpacket_msg_trunc_client() argument
510 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_msg_trunc_client()
522 static void test_seqpacket_msg_trunc_server(const struct test_opts *opts) in test_seqpacket_msg_trunc_server() argument
529 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_msg_trunc_server()
572 static void test_seqpacket_timeout_client(const struct test_opts *opts) in test_seqpacket_timeout_client() argument
580 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_timeout_client()
621 static void test_seqpacket_timeout_server(const struct test_opts *opts) in test_seqpacket_timeout_server() argument
625 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_timeout_server()
635 static void test_seqpacket_bigmsg_client(const struct test_opts *opts) in test_seqpacket_bigmsg_client() argument
644 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_bigmsg_client()
672 static void test_seqpacket_bigmsg_server(const struct test_opts *opts) in test_seqpacket_bigmsg_server() argument
676 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_bigmsg_server()
690 static void test_seqpacket_invalid_rec_buffer_client(const struct test_opts *opts) in test_seqpacket_invalid_rec_buffer_client() argument
697 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_invalid_rec_buffer_client()
725 static void test_seqpacket_invalid_rec_buffer_server(const struct test_opts *opts) in test_seqpacket_invalid_rec_buffer_server() argument
737 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_invalid_rec_buffer_server()
808 static void test_stream_poll_rcvlowat_server(const struct test_opts *opts) in test_stream_poll_rcvlowat_server() argument
813 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_poll_rcvlowat_server()
836 static void test_stream_poll_rcvlowat_client(const struct test_opts *opts) in test_stream_poll_rcvlowat_client() argument
844 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_poll_rcvlowat_client()
904 static void test_inv_buf_client(const struct test_opts *opts, bool stream) in test_inv_buf_client() argument
911 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_inv_buf_client()
913 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_inv_buf_client()
940 static void test_inv_buf_server(const struct test_opts *opts, bool stream) in test_inv_buf_server() argument
946 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_inv_buf_server()
948 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_inv_buf_server()
964 static void test_stream_inv_buf_client(const struct test_opts *opts) in test_stream_inv_buf_client() argument
966 test_inv_buf_client(opts, true); in test_stream_inv_buf_client()
969 static void test_stream_inv_buf_server(const struct test_opts *opts) in test_stream_inv_buf_server() argument
971 test_inv_buf_server(opts, true); in test_stream_inv_buf_server()
974 static void test_seqpacket_inv_buf_client(const struct test_opts *opts) in test_seqpacket_inv_buf_client() argument
976 test_inv_buf_client(opts, false); in test_seqpacket_inv_buf_client()
979 static void test_seqpacket_inv_buf_server(const struct test_opts *opts) in test_seqpacket_inv_buf_server() argument
981 test_inv_buf_server(opts, false); in test_seqpacket_inv_buf_server()
987 static void test_stream_virtio_skb_merge_client(const struct test_opts *opts) in test_stream_virtio_skb_merge_client() argument
991 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_virtio_skb_merge_client()
1014 static void test_stream_virtio_skb_merge_server(const struct test_opts *opts) in test_stream_virtio_skb_merge_server() argument
1020 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_virtio_skb_merge_server()
1055 static void test_seqpacket_msg_peek_client(const struct test_opts *opts) in test_seqpacket_msg_peek_client() argument
1057 return test_msg_peek_client(opts, true); in test_seqpacket_msg_peek_client()
1060 static void test_seqpacket_msg_peek_server(const struct test_opts *opts) in test_seqpacket_msg_peek_server() argument
1062 return test_msg_peek_server(opts, true); in test_seqpacket_msg_peek_server()
1103 static void test_stream_shutwr_client(const struct test_opts *opts) in test_stream_shutwr_client() argument
1113 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_shutwr_client()
1131 static void test_stream_shutwr_server(const struct test_opts *opts) in test_stream_shutwr_server() argument
1135 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_shutwr_server()
1146 static void test_stream_shutrd_client(const struct test_opts *opts) in test_stream_shutrd_client() argument
1156 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_shutrd_client()
1171 static void test_stream_shutrd_server(const struct test_opts *opts) in test_stream_shutrd_server() argument
1175 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_shutrd_server()
1192 static void test_double_bind_connect_server(const struct test_opts *opts) in test_double_bind_connect_server() argument
1198 listen_fd = vsock_stream_listen(VMADDR_CID_ANY, opts->peer_port); in test_double_bind_connect_server()
1223 static void test_double_bind_connect_client(const struct test_opts *opts) in test_double_bind_connect_client() argument
1236 client_fd = vsock_bind_connect(opts->peer_cid, opts->peer_port, in test_double_bind_connect_client()
1237 opts->peer_port + 1, SOCK_STREAM); in test_double_bind_connect_client()
1244 static void test_unsent_bytes_server(const struct test_opts *opts, int type) in test_unsent_bytes_server() argument
1249 client_fd = vsock_accept(VMADDR_CID_ANY, opts->peer_port, NULL, type); in test_unsent_bytes_server()
1261 static void test_unsent_bytes_client(const struct test_opts *opts, int type) in test_unsent_bytes_client() argument
1266 fd = vsock_connect(opts->peer_cid, opts->peer_port, type); in test_unsent_bytes_client()
1296 static void test_stream_unsent_bytes_client(const struct test_opts *opts) in test_stream_unsent_bytes_client() argument
1298 test_unsent_bytes_client(opts, SOCK_STREAM); in test_stream_unsent_bytes_client()
1301 static void test_stream_unsent_bytes_server(const struct test_opts *opts) in test_stream_unsent_bytes_server() argument
1303 test_unsent_bytes_server(opts, SOCK_STREAM); in test_stream_unsent_bytes_server()
1306 static void test_seqpacket_unsent_bytes_client(const struct test_opts *opts) in test_seqpacket_unsent_bytes_client() argument
1308 test_unsent_bytes_client(opts, SOCK_SEQPACKET); in test_seqpacket_unsent_bytes_client()
1311 static void test_seqpacket_unsent_bytes_server(const struct test_opts *opts) in test_seqpacket_unsent_bytes_server() argument
1313 test_unsent_bytes_server(opts, SOCK_SEQPACKET); in test_seqpacket_unsent_bytes_server()
1324 static void test_stream_rcvlowat_def_cred_upd_client(const struct test_opts *opts) in test_stream_rcvlowat_def_cred_upd_client() argument
1330 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_rcvlowat_def_cred_upd_client()
1357 static void test_stream_credit_update_test(const struct test_opts *opts, in test_stream_credit_update_test() argument
1366 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_credit_update_test()
1471 static void test_stream_cred_upd_on_low_rx_bytes(const struct test_opts *opts) in test_stream_cred_upd_on_low_rx_bytes() argument
1473 test_stream_credit_update_test(opts, true); in test_stream_cred_upd_on_low_rx_bytes()
1476 static void test_stream_cred_upd_on_set_rcvlowat(const struct test_opts *opts) in test_stream_cred_upd_on_set_rcvlowat() argument
1478 test_stream_credit_update_test(opts, false); in test_stream_cred_upd_on_set_rcvlowat()
1699 struct test_opts opts = { in main() local
1720 opts.mode = TEST_MODE_CLIENT; in main()
1722 opts.mode = TEST_MODE_SERVER; in main()
1729 opts.peer_cid = parse_cid(optarg); in main()
1732 opts.peer_port = parse_port(optarg); in main()
1752 if (opts.mode == TEST_MODE_UNSET) in main()
1754 if (opts.peer_cid == VMADDR_CID_ANY) in main()
1758 if (opts.mode != TEST_MODE_SERVER) in main()
1764 opts.mode == TEST_MODE_SERVER); in main()
1766 run_tests(test_cases, &opts); in main()