Stefan Hajnoczi | 0b02503 | 2017-10-05 16:46:54 -0400 | [diff] [blame] | 1 | AF_VSOCK test suite |
| 2 | ------------------- |
| 3 | These tests exercise net/vmw_vsock/ host<->guest sockets for VMware, KVM, and |
| 4 | Hyper-V. |
| 5 | |
| 6 | The following tests are available: |
| 7 | |
Stefan Hajnoczi | cdbcc18 | 2019-12-18 19:07:04 +0100 | [diff] [blame] | 8 | * vsock_test - core AF_VSOCK socket functionality |
Stefan Hajnoczi | 0b02503 | 2017-10-05 16:46:54 -0400 | [diff] [blame] | 9 | * vsock_diag_test - vsock_diag.ko module for listing open sockets |
| 10 | |
| 11 | The following prerequisite steps are not automated and must be performed prior |
| 12 | to running tests: |
| 13 | |
Stefan Hajnoczi | 4398546 | 2019-12-18 19:06:58 +0100 | [diff] [blame] | 14 | 1. Build the kernel, make headers_install, and build these tests. |
Stefan Hajnoczi | 0b02503 | 2017-10-05 16:46:54 -0400 | [diff] [blame] | 15 | 2. Install the kernel and tests on the host. |
| 16 | 3. Install the kernel and tests inside the guest. |
| 17 | 4. Boot the guest and ensure that the AF_VSOCK transport is enabled. |
| 18 | |
| 19 | Invoke test binaries in both directions as follows: |
| 20 | |
| 21 | # host=server, guest=client |
| 22 | (host)# $TEST_BINARY --mode=server \ |
| 23 | --control-port=1234 \ |
| 24 | --peer-cid=3 |
| 25 | (guest)# $TEST_BINARY --mode=client \ |
| 26 | --control-host=$HOST_IP \ |
| 27 | --control-port=1234 \ |
| 28 | --peer-cid=2 |
| 29 | |
| 30 | # host=client, guest=server |
| 31 | (guest)# $TEST_BINARY --mode=server \ |
| 32 | --control-port=1234 \ |
| 33 | --peer-cid=2 |
| 34 | (host)# $TEST_BINARY --mode=client \ |
| 35 | --control-port=$GUEST_IP \ |
| 36 | --control-port=1234 \ |
| 37 | --peer-cid=3 |