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