search for: send_byte

Displaying 7 results from an estimated 7 matches for "send_byte".

2019 Aug 01
0
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...errno %d\n", errno); + exit(EXIT_FAILURE); + } + + close(fd); +} + +static void test_stream_client_close_client(const struct test_opts *opts) +{ + int fd; + + fd = vsock_stream_connect(opts->peer_cid, 1234); + if (fd < 0) { + perror("connect"); + exit(EXIT_FAILURE); + } + + send_byte(fd, 1); + close(fd); + control_writeln("CLOSED"); +} + +static void test_stream_client_close_server(const struct test_opts *opts) +{ + int fd; + + fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); + if (fd < 0) { + perror("accept"); + exit(EXIT_FAILURE); + } + + control...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...close_client(const struct test_opts *opts) > +{ > + int fd; > + > + fd = vsock_stream_connect(opts->peer_cid, 1234); > + if (fd < 0) { > + perror("connect"); > + exit(EXIT_FAILURE); > + } > + > + send_byte(fd, 1); > + close(fd); > + control_writeln("CLOSED"); > +} > + > +static void test_stream_client_close_server(const struct test_opts *opts) > +{ > + int fd; > + > + fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); > + if (fd...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...close_client(const struct test_opts *opts) > +{ > + int fd; > + > + fd = vsock_stream_connect(opts->peer_cid, 1234); > + if (fd < 0) { > + perror("connect"); > + exit(EXIT_FAILURE); > + } > + > + send_byte(fd, 1); > + close(fd); > + control_writeln("CLOSED"); > +} > + > +static void test_stream_client_close_server(const struct test_opts *opts) > +{ > + int fd; > + > + fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); > + if (fd...
2019 Aug 01
13
[PATCH v2 00/11] VSOCK: add vsock_test test suite
...998/ Stefan Hajnoczi (7): VSOCK: fix header include in vsock_diag_test VSOCK: add SPDX identifiers to vsock tests VSOCK: extract utility functions from vsock_diag_test.c VSOCK: extract connect/accept functions from vsock_diag_test.c VSOCK: add full barrier between test cases VSOCK: add send_byte()/recv_byte() test utilities VSOCK: add AF_VSOCK test cases Stefano Garzarella (4): VSOCK: add vsock_get_local_cid() test utility vsock_test: add --transport parameter vsock_test: skip read() in test_stream*close tests on a VMCI host vsock_test: wait for the remote to close the connectio...
2019 Dec 18
13
[PATCH net-next v3 00/11] VSOCK: add vsock_test test suite
...998/ Stefan Hajnoczi (7): VSOCK: fix header include in vsock_diag_test VSOCK: add SPDX identifiers to vsock tests VSOCK: extract utility functions from vsock_diag_test.c VSOCK: extract connect/accept functions from vsock_diag_test.c VSOCK: add full barrier between test cases VSOCK: add send_byte()/recv_byte() test utilities VSOCK: add AF_VSOCK test cases Stefano Garzarella (4): vsock_test: wait for the remote to close the connection testing/vsock: add parameters to list and skip tests testing/vsock: print list of options and description vsock_test: add SOCK_STREAM MSG_PEEK test...
2019 Aug 01
0
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...unsigned int local_cid; int fd; fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); @@ -79,16 +80,27 @@ static void test_stream_client_close_server(const struct test_opts *opts) exit(EXIT_FAILURE); } + local_cid = vsock_get_local_cid(fd); + control_expectln("CLOSED"); send_byte(fd, -EPIPE); - recv_byte(fd, 1); + + /* Skip the read of data wrote by the peer if we are on VMCI and + * we are on the host side, because when the guest closes a + * connection, all data is gone and EOF is returned. + */ + if (!(opts->transport == TEST_TRANSPORT_VMCI && + local_c...
2019 Aug 01
1
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...; +++ b/tools/testing/vsock/vsock_test.c [...] > @@ -79,16 +80,27 @@ static void test_stream_client_close_server(const struct test_opts *opts) > exit(EXIT_FAILURE); > } > > + local_cid = vsock_get_local_cid(fd); > + > control_expectln("CLOSED"); > > send_byte(fd, -EPIPE); > - recv_byte(fd, 1); > + > + /* Skip the read of data wrote by the peer if we are on VMCI and s/wrote/written/? > + * we are on the host side, because when the guest closes a > + * connection, all data is gone and EOF is returned. > + */ > + if (!(opts-&gt...