Skip to content

VSOCK: add vsock_test test suite

Stefan Hajnoczi netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5VSOCK: extract utility functions from vsock_diag_test.ctools/testing/vsock/Makefile tools/testing/vsock/util.c tools/testing/vsock/util.h +1 more+128 -710 replies
2/5VSOCK: extract connect/accept functions from vsock_diag_test.ctools/testing/vsock/util.c tools/testing/vsock/util.h tools/testing/vsock/vsock_diag_test.c+119 -762 replies
3/5VSOCK: add full barrier between test casestools/testing/vsock/util.c+16 -20 replies
4/5VSOCK: add send_byte()/recv_byte() test utilitiestools/testing/vsock/util.c tools/testing/vsock/util.h+101 -00 replies
5/5VSOCK: add AF_VSOCK test casestools/testing/vsock/.gitignore tools/testing/vsock/Makefile tools/testing/vsock/README +1 more+326 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] VSOCK: add vsock_test test suite

The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases that exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept, half-closed connections, simultaneous connections).

The test suite is modest but I hope to cover additional cases in the future. My goal is to have a shared test suite so VMCI, Hyper-V, and KVM can ensure that our transports behave the same.

I have tested virtio-vsock.

Jorgen: Please test the VMCI transport and let me know if anything needs to be adjusted. See tools/testing/vsock/README for information on how to run the test suite.

Dexuan: I'm not sure if this test suite is useful for the Hyper-V transport since the host is Windows and uses a different API for AF_HYPERV?

Stefan Hajnoczi (5):
VSOCK: extract utility functions from vsock_diag_test.c
VSOCK: extract connect/accept functions from vsock_diag_test.c
VSOCK: add full barrier between test cases
VSOCK: add send_byte()/recv_byte() test utilities
VSOCK: add AF_VSOCK test cases

 tools/testing/vsock/Makefile          |   7 +-
 tools/testing/vsock/util.h            |  43 +++++
 tools/testing/vsock/util.c            | 291 ++++++++++++++++++++++++++++++
 tools/testing/vsock/vsock_diag_test.c | 167 +++---------------
 tools/testing/vsock/vsock_test.c      | 321 ++++++++++++++++++++++++++++++++++
 tools/testing/vsock/.gitignore        |   1 +
 tools/testing/vsock/README            |   1 +
 7 files changed, 685 insertions(+), 146 deletions(-)
 create mode 100644 tools/testing/vsock/util.h
 create mode 100644 tools/testing/vsock/util.c
 create mode 100644 tools/testing/vsock/vsock_test.c
Signature · 1 line
2.14.3