Linux vsock tests
(adapted for FreeBSD)
| .clang-format | restore server functionality and clang-format this whole thing | |
| .gitignore | Initial Import | |
| control.c | restore server functionality and clang-format this whole thing | |
| control.h | Initial Import | |
| LICENSE | Initial Import | |
| Makefile | make client tests compile and run on FreeBSD, remove server tests | |
| README.md | fixup readme now that --mode=server has been restored | |
| timeout.c | Initial Import | |
| timeout.h | Initial Import | |
| util.c | restore server functionality and clang-format this whole thing | |
| util.h | restore server functionality and clang-format this whole thing | |
| vsock_test.c | restore server functionality and clang-format this whole thing | |
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:
- On the FreeBSD Guest, build the FreeBSD kernel module, install the headers (
sys/socket.h,sys/vm_sockets.h) - Build these tests with GNU make
- On the Linux Host, build and install this full Linux vsock test suite
- On the FreeBSD Guest, install the FreeBSD kernel module and these tests inside the guest.
kldload -v virtio_socketand ensure that it shows up as loadedkldstat(8), and shows diagnostics indmesg
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.