1*4882a593SmuzhiyunAF_VSOCK test suite 2*4882a593Smuzhiyun------------------- 3*4882a593SmuzhiyunThese tests exercise net/vmw_vsock/ host<->guest sockets for VMware, KVM, and 4*4882a593SmuzhiyunHyper-V. 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThe following tests are available: 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun * vsock_test - core AF_VSOCK socket functionality 9*4882a593Smuzhiyun * vsock_diag_test - vsock_diag.ko module for listing open sockets 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThe following prerequisite steps are not automated and must be performed prior 12*4882a593Smuzhiyunto running tests: 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun1. Build the kernel, make headers_install, and build these tests. 15*4882a593Smuzhiyun2. Install the kernel and tests on the host. 16*4882a593Smuzhiyun3. Install the kernel and tests inside the guest. 17*4882a593Smuzhiyun4. Boot the guest and ensure that the AF_VSOCK transport is enabled. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunInvoke test binaries in both directions as follows: 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun # host=server, guest=client 22*4882a593Smuzhiyun (host)# $TEST_BINARY --mode=server \ 23*4882a593Smuzhiyun --control-port=1234 \ 24*4882a593Smuzhiyun --peer-cid=3 25*4882a593Smuzhiyun (guest)# $TEST_BINARY --mode=client \ 26*4882a593Smuzhiyun --control-host=$HOST_IP \ 27*4882a593Smuzhiyun --control-port=1234 \ 28*4882a593Smuzhiyun --peer-cid=2 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun # host=client, guest=server 31*4882a593Smuzhiyun (guest)# $TEST_BINARY --mode=server \ 32*4882a593Smuzhiyun --control-port=1234 \ 33*4882a593Smuzhiyun --peer-cid=2 34*4882a593Smuzhiyun (host)# $TEST_BINARY --mode=client \ 35*4882a593Smuzhiyun --control-port=$GUEST_IP \ 36*4882a593Smuzhiyun --control-port=1234 \ 37*4882a593Smuzhiyun --peer-cid=3 38