Lines Matching refs:opts

29 static void test_stream_connection_reset(const struct test_opts *opts)
37 .svm_port = opts->peer_port,
38 .svm_cid = opts->peer_cid,
65 static void test_stream_bind_only_client(const struct test_opts *opts)
73 .svm_port = opts->peer_port,
74 .svm_cid = opts->peer_cid,
107 static void test_stream_bind_only_server(const struct test_opts *opts)
115 .svm_port = opts->peer_port,
137 static void test_stream_client_close_client(const struct test_opts *opts)
141 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
151 static void test_stream_client_close_server(const struct test_opts *opts)
155 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
172 static void test_stream_server_close_client(const struct test_opts *opts)
176 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
193 static void test_stream_server_close_server(const struct test_opts *opts)
197 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
212 static void test_stream_multiconn_client(const struct test_opts *opts)
218 fds[i] = vsock_stream_connect(opts->peer_cid, opts->peer_port);
236 static void test_stream_multiconn_server(const struct test_opts *opts)
242 fds[i] = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
262 static void test_msg_peek_client(const struct test_opts *opts,
270 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
272 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
289 static void test_msg_peek_server(const struct test_opts *opts,
298 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
300 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
345 static void test_stream_msg_peek_client(const struct test_opts *opts)
347 return test_msg_peek_client(opts, false);
350 static void test_stream_msg_peek_server(const struct test_opts *opts)
352 return test_msg_peek_server(opts, false);
358 static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
366 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
428 static void test_seqpacket_msg_bounds_server(const struct test_opts *opts)
437 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
503 static void test_seqpacket_msg_trunc_client(const struct test_opts *opts)
508 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
520 static void test_seqpacket_msg_trunc_server(const struct test_opts *opts)
527 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
570 static void test_seqpacket_timeout_client(const struct test_opts *opts)
578 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
619 static void test_seqpacket_timeout_server(const struct test_opts *opts)
623 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
633 static void test_seqpacket_bigmsg_client(const struct test_opts *opts)
642 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
670 static void test_seqpacket_bigmsg_server(const struct test_opts *opts)
674 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
688 static void test_seqpacket_invalid_rec_buffer_client(const struct test_opts *opts)
695 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
723 static void test_seqpacket_invalid_rec_buffer_server(const struct test_opts *opts)
735 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
806 static void test_stream_poll_rcvlowat_server(const struct test_opts *opts)
811 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
834 static void test_stream_poll_rcvlowat_client(const struct test_opts *opts)
842 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
902 static void test_inv_buf_client(const struct test_opts *opts, bool stream)
909 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
911 fd = vsock_seqpacket_connect(opts->peer_cid, opts->peer_port);
938 static void test_inv_buf_server(const struct test_opts *opts, bool stream)
944 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
946 fd = vsock_seqpacket_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
962 static void test_stream_inv_buf_client(const struct test_opts *opts)
964 test_inv_buf_client(opts, true);
967 static void test_stream_inv_buf_server(const struct test_opts *opts)
969 test_inv_buf_server(opts, true);
972 static void test_seqpacket_inv_buf_client(const struct test_opts *opts)
974 test_inv_buf_client(opts, false);
977 static void test_seqpacket_inv_buf_server(const struct test_opts *opts)
979 test_inv_buf_server(opts, false);
985 static void test_stream_virtio_skb_merge_client(const struct test_opts *opts)
989 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
1012 static void test_stream_virtio_skb_merge_server(const struct test_opts *opts)
1018 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
1053 static void test_seqpacket_msg_peek_client(const struct test_opts *opts)
1055 return test_msg_peek_client(opts, true);
1058 static void test_seqpacket_msg_peek_server(const struct test_opts *opts)
1060 return test_msg_peek_server(opts, true);
1101 static void test_stream_shutwr_client(const struct test_opts *opts)
1111 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
1129 static void test_stream_shutwr_server(const struct test_opts *opts)
1133 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
1144 static void test_stream_shutrd_client(const struct test_opts *opts)
1154 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
1169 static void test_stream_shutrd_server(const struct test_opts *opts)
1173 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
1190 static void test_double_bind_connect_server(const struct test_opts *opts)
1196 listen_fd = vsock_stream_listen(VMADDR_CID_ANY, opts->peer_port);
1221 static void test_double_bind_connect_client(const struct test_opts *opts)
1234 client_fd = vsock_bind_connect(opts->peer_cid, opts->peer_port,
1235 opts->peer_port + 1, SOCK_STREAM);
1249 static void test_stream_rcvlowat_def_cred_upd_client(const struct test_opts *opts)
1255 fd = vsock_stream_connect(opts->peer_cid, opts->peer_port);
1282 static void test_stream_credit_update_test(const struct test_opts *opts,
1291 fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL);
1396 static void test_stream_cred_upd_on_low_rx_bytes(const struct test_opts *opts)
1398 test_stream_credit_update_test(opts, true);
1401 static void test_stream_cred_upd_on_set_rcvlowat(const struct test_opts *opts)
1403 test_stream_credit_update_test(opts, false);
1614 struct test_opts opts = {
1635 opts.mode = TEST_MODE_CLIENT;
1637 opts.mode = TEST_MODE_SERVER;
1644 opts.peer_cid = parse_cid(optarg);
1647 opts.peer_port = parse_port(optarg);
1667 if (opts.mode == TEST_MODE_UNSET)
1669 if (opts.peer_cid == VMADDR_CID_ANY)
1673 if (opts.mode != TEST_MODE_SERVER)
1679 opts.mode == TEST_MODE_SERVER);
1681 run_tests(test_cases, &opts);