vsock_test: wait for the remote to close the connection
authorStefano Garzarella <sgarzare@redhat.com>
Wed, 18 Dec 2019 18:07:05 +0000 (19:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:09:21 +0000 (21:09 -0800)
commit770ce0078cbf97262e86c9cc210684ce3b4266f5
tree85e0eea8ad26fec89991c34184144bd5ae8bbf73
parentcdbcc18de10a7d72b821fe40fbc2d0ec61e39448
vsock_test: wait for the remote to close the connection

Before check if a send returns -EPIPE, we need to make sure the
connection is closed.
To do that, we use epoll API to wait EPOLLRDHUP or EPOLLHUP events
on the socket.

Reported-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/vsock/util.c
tools/testing/vsock/util.h
tools/testing/vsock/vsock_test.c