Displaying 3 results from an estimated 3 matches for "test_transport_vmci".
2019 Aug 01
0
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
..._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_cid == VMADDR_CID_HOST))
+ recv_byte(fd, 1);
+
recv_byte(fd, 0);
close(fd);
}
static void test_stream_server_close_client(const struct test_opts *opts)
{
+ unsigned int local_cid;
int fd;
fd = vsock_stream_connect(opts->peer_cid, 1234);
@@ -97,10 +109,20 @@...
2019 Aug 01
1
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...> - 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->transport == TEST_TRANSPORT_VMCI &&
> + local_cid == VMADDR_CID_HOST))
> + recv_byte(fd, 1);
> +
> recv_byte(fd, 0);
> close(fd);
> }
[...]
MBR, Sergei
2019 Aug 01
13
[PATCH v2 00/11] VSOCK: add vsock_test test suite
The vsock_diag.ko module already has a test suite but the core AF_VSOCK
functionality has no tests. This patch series adds several test cases that
exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept,
half-closed connections, simultaneous connections).
Stefan: Do you think we should have a single application or is better to
split it in single tests (e.g.