1
0
Fork
You've already forked vsock-tests
0
Linux vsock tests (adapted for FreeBSD)
  • C 99.4%
  • Makefile 0.6%
2024年02月25日 21:31:18 +00:00
.clang-format restore server functionality and clang-format this whole thing 2024年02月25日 17:35:32 +00:00
.gitignore Initial Import 2024年02月25日 02:50:55 +00:00
control.c restore server functionality and clang-format this whole thing 2024年02月25日 17:35:32 +00:00
control.h Initial Import 2024年02月25日 02:50:55 +00:00
LICENSE Initial Import 2024年02月25日 02:50:55 +00:00
Makefile make client tests compile and run on FreeBSD, remove server tests 2024年02月25日 02:54:40 +00:00
README.md fixup readme now that --mode=server has been restored 2024年02月25日 21:31:18 +00:00
timeout.c Initial Import 2024年02月25日 02:50:55 +00:00
timeout.h Initial Import 2024年02月25日 02:50:55 +00:00
util.c restore server functionality and clang-format this whole thing 2024年02月25日 17:35:32 +00:00
util.h restore server functionality and clang-format this whole thing 2024年02月25日 17:35:32 +00:00
vsock_test.c restore server functionality and clang-format this whole thing 2024年02月25日 17:35:32 +00:00

AF_VSOCK test suite

These tests exercise virtio_socket host<->guest sockets for KVM, but should in theory work for VMware and Hyper-V, too.

The following tests are available:

  • vsock_test - core AF_VSOCK socket functionality

The following prerequisite steps are not automated and must be performed prior to running tests:

  1. On the FreeBSD Guest, build the FreeBSD kernel module, install the headers (sys/socket.h, sys/vm_sockets.h)
  2. Build these tests with GNU make
  3. On the Linux Host, build and install this full Linux vsock test suite
  4. On the FreeBSD Guest, install the FreeBSD kernel module and these tests inside the guest.
  5. kldload -v virtio_socket and ensure that it shows up as loaded kldstat(8), and shows diagnostics in dmesg

Invoke test binaries in both directions as follows:

# host=server, guest=client
(host)# ./vsock_test --mode=server \
 --control-port=1234 \
 --peer-cid=3
(guest)# ./vsock_test --mode=client \
 --control-host=$HOST_IP \
 --control-port=1234 \
 --peer-cid=2

and

# host=client, guest=server
(guest)# ./vsock_test --mode=server \
 --control-port=1234 \
 --peer-cid=2
(host)# ./vsock_test --mode=client \
 --control-port=$GUEST_IP \
 --control-port=1234 \
 --peer-cid=3

vsock_perf utility

The 'vsock_perf' is, as of yet, not provided on FreeBSD.