]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit16846112f8f0962afb35ca5fef5e5542241d7f5e
tree85e0eea8ad26fec89991c34184144bd5ae8bbf73
parent5342b3d20e60e7306e2881c151b4c0b9d9aeeee3
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