summaryrefslogtreecommitdiffstats
path: root/tools/testing/vsock/util.h
Commit message (Collapse)AuthorAgeFilesLines
* testing/vsock: add parameters to list and skip testsStefano Garzarella2019-12-201-1/+5
| | | | | | | | | Some tests can fail with transports that have a slightly different behavior, so let's add the possibility to specify which tests to skip. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vsock_test: wait for the remote to close the connectionStefano Garzarella2019-12-201-0/+1
| | | | | | | | | | | 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>
* VSOCK: add send_byte()/recv_byte() test utilitiesStefan Hajnoczi2019-12-201-0/+2
| | | | | | | | | Test cases will want to transfer data. This patch adds utility functions to do this. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* VSOCK: extract connect/accept functions from vsock_diag_test.cStefan Hajnoczi2019-12-201-0/+6
| | | | | | | | | | Many test cases will need to connect to the server or accept incoming connections. This patch extracts these operations into utility functions that can be reused. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* VSOCK: extract utility functions from vsock_diag_test.cStefan Hajnoczi2019-12-201-0/+36
Move useful functions into a separate file in preparation for more vsock test programs. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>