Displaying 1 result from an estimated 1 matches for "test_stream_shutwr_client".
Did you mean:
test_stream_shutrd_client
2023 Aug 31
0
[RFC PATCH v2 2/2] test/vsock: shutdowned socket test
...GNAL);
>+ if (res != -1) {
>+ fprintf(stderr, "expected send(2) failure, got %zi\n", res);
>+ exit(EXIT_FAILURE);
>+ }
>+
>+ if (have_sigpipe) {
>+ fprintf(stderr, "SIGPIPE not expected\n");
>+ exit(EXIT_FAILURE);
>+ }
>+}
>+
>+static void test_stream_shutwr_client(const struct test_opts *opts)
>+{
>+ int fd;
>+
>+ struct sigaction act = {
>+ .sa_handler = sigpipe,
>+ };
>+
>+ sigaction(SIGPIPE, &act, NULL);
>+
>+ fd = vsock_stream_connect(opts->peer_cid, 1234);
>+ if (fd < 0) {
>+ perror("connect");
&...