1RDS self-tests 2============== 3 4These scripts provide a coverage test for RDS-TCP and RDS-RDMA (over 5RoCE/RXE) by setting up two endpoints and running RDS packets between 6them. The TCP path creates two network namespaces; the RDMA path uses 7an RXE (soft RoCE) device backed by a veth pair. A workload of 50000 8hashes, each 64 characters in size, is passed over an RDS socket on 9this test network with an optional probability of packet loss or 10corruption. A passing test means the RDS stack was able to recover 11properly. The provided config.sh can be used to compile the kernel 12with the necessary gcov options; pass -r to also enable the kernel 13configs required for the RDMA transport. The kernel may optionally be 14configured to omit the coverage report as well. 15 16USAGE: 17 rds_run.sh [-d logdir] [-l packet_loss] [-c packet_corruption] 18 [-u packet_duplicate] [-t timeout] 19 [-T tcp|rdma|tcp,rdma] 20 21OPTIONS: 22 -d Log directory. If set, logs will be stored in the 23 given dir, or skipped if unset. Log dir can also be 24 set through the RDS_LOG_DIR env variable 25 26 -l Simulates a percentage of packet loss 27 28 -c Simulates a percentage of packet corruption 29 30 -u Simulates a percentage of packet duplication. 31 32 -t Test timeout. Defaults to tools/testing/selftests/net/rds/settings 33 34 -T Comma-separated list of transports to test. Accepts 35 "tcp", "rdma", or "tcp,rdma". Defaults to "tcp". Use 36 config.sh -r to enable required RDMA configs 37 38ENV VARIABLES: 39 RDS_LOG_DIR Log directory. If set, logs will be stored in 40 the given dir, or skipped if unset. Log dir 41 can also be set with the -d flag. 42 43 Use with --rwdir on the CI path to retain logs after 44 test compleation. Log dir end point must be within 45 the specified --rwdir path for logs to persist on 46 the host. 47 48 SUDO_USER The user name that should be used for tcpdump 49 --relinquish-privileges. Set this to a user 50 belonging to the sudoers group to avoid drop 51 privilege errors with the vng 9p filesystem 52 which may result in empty pcaps 53 54EXAMPLE: 55 56 # Create a suitable gcov enabled .config 57 tools/testing/selftests/net/rds/config.sh -g 58 59 # Optionally add RDMA configs (CONFIG_RDS_RDMA, CONFIG_RDMA_RXE) 60 tools/testing/selftests/net/rds/config.sh -r 61 62 # Alternatly create a gcov disabled .config 63 tools/testing/selftests/net/rds/config.sh 64 65 # Config paths may also be specified with the -c flag 66 tools/testing/selftests/net/rds/config.sh -c .config.local 67 68 # build the kernel 69 vng --build --config .config 70 71 # launch the tests in a VM 72 vng -v --rwdir ./ --run . --user root --cpus 4 -- \ 73 "export PYTHONPATH=tools/testing/selftests/net/; \ 74 export SUDO_USER=example_user; \ 75 export RDS_LOG_DIR=tools/testing/selftests/net/rds/rds_logs; \ 76 tools/testing/selftests/net/rds/rds_run.sh -T tcp,rdma" 77 78