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()
501 static void test_seqpacket_msg_trunc_client(const struct test_opts *opts) in test_seqpacket_msg_trunc_client() argument
506 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_msg_trunc_client()
518 static void test_seqpacket_msg_trunc_server(const struct test_opts *opts) in test_seqpacket_msg_trunc_server() argument
525 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_msg_trunc_server()
568 static void test_seqpacket_timeout_client(const struct test_opts *opts) in test_seqpacket_timeout_client() argument
576 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_timeout_client()
615 static void test_seqpacket_timeout_server(const struct test_opts *opts) in test_seqpacket_timeout_server() argument
619 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_timeout_server()
629 static void test_seqpacket_bigmsg_client(const struct test_opts *opts) in test_seqpacket_bigmsg_client() argument
639 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_bigmsg_client()
674 static void test_seqpacket_bigmsg_server(const struct test_opts *opts) in test_seqpacket_bigmsg_server() argument
678 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_bigmsg_server()
692 static void test_seqpacket_invalid_rec_buffer_client(const struct test_opts *opts) in test_seqpacket_invalid_rec_buffer_client() argument
699 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_seqpacket_invalid_rec_buffer_client()
727 static void test_seqpacket_invalid_rec_buffer_server(const struct test_opts *opts) in test_seqpacket_invalid_rec_buffer_server() argument
739 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_seqpacket_invalid_rec_buffer_server()
810 static void test_stream_poll_rcvlowat_server(const struct test_opts *opts) in test_stream_poll_rcvlowat_server() argument
815 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_poll_rcvlowat_server()
838 static void test_stream_poll_rcvlowat_client(const struct test_opts *opts) in test_stream_poll_rcvlowat_client() argument
846 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_poll_rcvlowat_client()
903 static void test_inv_buf_client(const struct test_opts *opts, bool stream) in test_inv_buf_client() argument
910 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_inv_buf_client()
912 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port); in test_inv_buf_client()
939 static void test_inv_buf_server(const struct test_opts *opts, bool stream) in test_inv_buf_server() argument
945 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_inv_buf_server()
947 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_inv_buf_server()
963 static void test_stream_inv_buf_client(const struct test_opts *opts) in test_stream_inv_buf_client() argument
965 test_inv_buf_client(opts, true); in test_stream_inv_buf_client()
968 static void test_stream_inv_buf_server(const struct test_opts *opts) in test_stream_inv_buf_server() argument
970 test_inv_buf_server(opts, true); in test_stream_inv_buf_server()
973 static void test_seqpacket_inv_buf_client(const struct test_opts *opts) in test_seqpacket_inv_buf_client() argument
975 test_inv_buf_client(opts, false); in test_seqpacket_inv_buf_client()
978 static void test_seqpacket_inv_buf_server(const struct test_opts *opts) in test_seqpacket_inv_buf_server() argument
980 test_inv_buf_server(opts, false); in test_seqpacket_inv_buf_server()
986 static void test_stream_virtio_skb_merge_client(const struct test_opts *opts) in test_stream_virtio_skb_merge_client() argument
990 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_virtio_skb_merge_client()
1013 static void test_stream_virtio_skb_merge_server(const struct test_opts *opts) in test_stream_virtio_skb_merge_server() argument
1019 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_virtio_skb_merge_server()
1054 static void test_seqpacket_msg_peek_client(const struct test_opts *opts) in test_seqpacket_msg_peek_client() argument
1056 return test_msg_peek_client(opts, true); in test_seqpacket_msg_peek_client()
1059 static void test_seqpacket_msg_peek_server(const struct test_opts *opts) in test_seqpacket_msg_peek_server() argument
1061 return test_msg_peek_server(opts, true); in test_seqpacket_msg_peek_server()
1102 static void test_stream_shutwr_client(const struct test_opts *opts) in test_stream_shutwr_client() argument
1112 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_shutwr_client()
1130 static void test_stream_shutwr_server(const struct test_opts *opts) in test_stream_shutwr_server() argument
1134 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_shutwr_server()
1145 static void test_stream_shutrd_client(const struct test_opts *opts) in test_stream_shutrd_client() argument
1155 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_shutrd_client()
1170 static void test_stream_shutrd_server(const struct test_opts *opts) in test_stream_shutrd_server() argument
1174 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); in test_stream_shutrd_server()
1191 static void test_double_bind_connect_server(const struct test_opts *opts) in test_double_bind_connect_server() argument
1197 listen_fd = vsock_stream_listen(VMADDR_CID_ANY, opts->peer_port); in test_double_bind_connect_server()
1222 static void test_double_bind_connect_client(const struct test_opts *opts) in test_double_bind_connect_client() argument
1235 client_fd = vsock_bind_connect(opts->peer_cid, opts->peer_port, in test_double_bind_connect_client()
1236 opts->peer_port + 1, SOCK_STREAM); in test_double_bind_connect_client()
1243 static void test_unsent_bytes_server(const struct test_opts *opts, int type) in test_unsent_bytes_server() argument
1248 client_fd = vsock_accept(VMADDR_CID_ANY, opts->peer_port, NULL, type); in test_unsent_bytes_server()
1260 static void test_unsent_bytes_client(const struct test_opts *opts, int type) in test_unsent_bytes_client() argument
1265 fd = vsock_connect(opts->peer_cid, opts->peer_port, type); in test_unsent_bytes_client()
1295 static void test_stream_unsent_bytes_client(const struct test_opts *opts) in test_stream_unsent_bytes_client() argument
1297 test_unsent_bytes_client(opts, SOCK_STREAM); in test_stream_unsent_bytes_client()
1300 static void test_stream_unsent_bytes_server(const struct test_opts *opts) in test_stream_unsent_bytes_server() argument
1302 test_unsent_bytes_server(opts, SOCK_STREAM); in test_stream_unsent_bytes_server()
1305 static void test_seqpacket_unsent_bytes_client(const struct test_opts *opts) in test_seqpacket_unsent_bytes_client() argument
1307 test_unsent_bytes_client(opts, SOCK_SEQPACKET); in test_seqpacket_unsent_bytes_client()
1310 static void test_seqpacket_unsent_bytes_server(const struct test_opts *opts) in test_seqpacket_unsent_bytes_server() argument
1312 test_unsent_bytes_server(opts, SOCK_SEQPACKET); in test_seqpacket_unsent_bytes_server()
1323 static void test_stream_rcvlowat_def_cred_upd_client(const struct test_opts *opts) in test_stream_rcvlowat_def_cred_upd_client() argument
1329 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); in test_stream_rcvlowat_def_cred_upd_client()
1356 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()
1466 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
1468 test_stream_credit_update_test(opts, true); in test_stream_cred_upd_on_low_rx_bytes()
1471 static void test_stream_cred_upd_on_set_rcvlowat(const struct test_opts *opts) in test_stream_cred_upd_on_set_rcvlowat() argument
1473 test_stream_credit_update_test(opts, false); in test_stream_cred_upd_on_set_rcvlowat()
1694 struct test_opts opts = { in main() local
1715 opts.mode = TEST_MODE_CLIENT; in main()
1717 opts.mode = TEST_MODE_SERVER; in main()
1724 opts.peer_cid = parse_cid(optarg); in main()
1727 opts.peer_port = parse_port(optarg); in main()
1747 if (opts.mode == TEST_MODE_UNSET) in main()
1749 if (opts.peer_cid == VMADDR_CID_ANY) in main()
1753 if (opts.mode != TEST_MODE_SERVER) in main()
1759 opts.mode == TEST_MODE_SERVER); in main()
1761 run_tests(test_cases, &opts); in main()