search for: timeout_end

Displaying 5 results from an estimated 5 matches for "timeout_end".

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.
2019 Dec 18
13
[PATCH net-next v3 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). The v1 of this series was originally sent by Stefan. v3: - Patch 6: * check the byte received in the recv_byte() * use
2019 Aug 01
0
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...rt = 1234, + .svm_cid = opts->peer_cid, + }, + }; + int ret; + int fd; + + fd = socket(AF_VSOCK, SOCK_STREAM, 0); + + timeout_begin(TIMEOUT); + do { + ret = connect(fd, &addr.sa, sizeof(addr.svm)); + timeout_check("connect"); + } while (ret < 0 && errno == EINTR); + timeout_end(); + + if (ret != -1) { + fprintf(stderr, "expected connect(2) failure, got %d\n", ret); + exit(EXIT_FAILURE); + } + if (errno != ECONNRESET) { + fprintf(stderr, "unexpected connect(2) errno %d\n", errno); + exit(EXIT_FAILURE); + } + + close(fd); +} + +static void test_strea...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...socket(AF_VSOCK, SOCK_STREAM, 0); > + > + timeout_begin(TIMEOUT); > + do { > + ret = connect(fd, &addr.sa, sizeof(addr.svm)); > + timeout_check("connect"); > + } while (ret < 0 && errno == EINTR); > + timeout_end(); > + > + if (ret != -1) { > + fprintf(stderr, "expected connect(2) failure, got %d\n", ret); > + exit(EXIT_FAILURE); > + } > + if (errno != ECONNRESET) { > + fprintf(stderr, "unexpected connect(2) errn...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...socket(AF_VSOCK, SOCK_STREAM, 0); > + > + timeout_begin(TIMEOUT); > + do { > + ret = connect(fd, &addr.sa, sizeof(addr.svm)); > + timeout_check("connect"); > + } while (ret < 0 && errno == EINTR); > + timeout_end(); > + > + if (ret != -1) { > + fprintf(stderr, "expected connect(2) failure, got %d\n", ret); > + exit(EXIT_FAILURE); > + } > + if (errno != ECONNRESET) { > + fprintf(stderr, "unexpected connect(2) errn...