diff options
Diffstat (limited to 'tools/testing/vsock/vsock_test.c')
-rw-r--r-- | tools/testing/vsock/vsock_test.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index 9d3a77be26f4..b3258d6ba21a 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -1813,10 +1813,6 @@ static void test_stream_connect_retry_server(const struct test_opts *opts) static void test_stream_linger_client(const struct test_opts *opts) { - struct linger optval = { - .l_onoff = 1, - .l_linger = 1 - }; int fd; fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); @@ -1825,11 +1821,7 @@ static void test_stream_linger_client(const struct test_opts *opts) exit(EXIT_FAILURE); } - if (setsockopt(fd, SOL_SOCKET, SO_LINGER, &optval, sizeof(optval))) { - perror("setsockopt(SO_LINGER)"); - exit(EXIT_FAILURE); - } - + enable_so_linger(fd, 1); close(fd); } |