1Running tests 2============= 3 4Tests are executed within kselftest framework like any other tests. 5By default tests execute against software drivers such as netdevsim. 6All tests must support running against a real device (SW-only tests 7should instead be placed in net/ or drivers/net/netdevsim, HW-only 8tests in drivers/net/hw). 9 10Set appropriate variables to point the tests at a real device. 11 12Variables 13========= 14 15Variables can be set in the environment or by creating a net.config 16file in the same directory as this README file. Example:: 17 18 $ NETIF=eth0 ./some_test.sh 19 20or:: 21 22 $ cat tools/testing/selftests/drivers/net/net.config 23 # Variable set in a file 24 NETIF=eth0 25 26Please note that the config parser is very simple, if there are 27any non-alphanumeric characters in the value it needs to be in 28double quotes. 29 30NETIF 31~~~~~ 32 33Name of the netdevice against which the test should be executed. 34When empty or not set software devices will be used. 35 36LOCAL_V4, LOCAL_V6, REMOTE_V4, REMOTE_V6 37~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 39Local and remote endpoint IP addresses. 40 41REMOTE_TYPE 42~~~~~~~~~~~ 43 44Communication method used to run commands on the remote endpoint. 45Test framework has built-in support for ``netns`` and ``ssh`` channels. 46``netns`` assumes the "remote" interface is part of the same 47host, just moved to the specified netns. 48``ssh`` communicates with remote endpoint over ``ssh`` and ``scp``. 49Using persistent SSH connections is strongly encouraged to avoid 50the latency of SSH connection setup on every command. 51 52Communication methods are defined by classes in ``lib/py/remote_{name}.py``. 53It should be possible to add a new method without modifying any of 54the framework, by simply adding an appropriately named file to ``lib/py``. 55 56REMOTE_ARGS 57~~~~~~~~~~~ 58 59Arguments used to construct the communication channel. 60Communication channel dependent:: 61 62 for netns - name of the "remote" namespace 63 for ssh - name/address of the remote host 64