hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/testing/selftests/tc-testing/README
....@@ -12,10 +12,10 @@
1212 * Minimum Python version of 3.4. Earlier 3.X versions may work but are not
1313 guaranteed.
1414
15
-* The kernel must have network namespace support
15
+* The kernel must have network namespace support if using nsPlugin
1616
1717 * The kernel must have veth support available, as a veth pair is created
18
- prior to running the tests.
18
+ prior to running the tests when using nsPlugin.
1919
2020 * The kernel must have the appropriate infrastructure enabled to run all tdc
2121 unit tests. See the config file in this directory for minimum required
....@@ -53,8 +53,12 @@
5353 execution by root uid has been moved into a plugin (see PLUGIN
5454 ARCHITECTURE, below).
5555
56
-If nsPlugin is linked, all tests are executed inside a network
57
-namespace to prevent conflicts within the host.
56
+Tests that use a network device should have nsPlugin.py listed as a
57
+requirement for that test. nsPlugin executes all commands within a
58
+network namespace and creates a veth pair which may be used in those test
59
+cases. To disable execution within the namespace, pass the -N option
60
+to tdc when starting a test run; the veth pair will still be created
61
+by the plugin.
5862
5963 Running tdc without any arguments will run all tests. Refer to the section
6064 on command line arguments for more information, or run:
....@@ -124,7 +128,9 @@
124128 -v, --verbose Show the commands that are being run
125129 -N, --notap Suppress tap results for command under test
126130 -d DEVICE, --device DEVICE
127
- Execute the test case in flower category
131
+ Execute test cases that use a physical device, where
132
+ DEVICE is its name. (If not defined, tests that require
133
+ a physical device will be skipped)
128134 -P, --pause Pause execution just before post-suite stage
129135
130136 selection:
....@@ -154,8 +160,8 @@
154160 netns:
155161 options for nsPlugin (run commands in net namespace)
156162
157
- -n, --namespace
158
- Run commands in namespace as specified in tdc_config.py
163
+ -N, --no-namespace
164
+ Do not run commands in a network namespace.
159165
160166 valgrind:
161167 options for valgrindPlugin (run command under test under Valgrind)
....@@ -171,7 +177,8 @@
171177
172178 The plugins are in the directory plugin-lib. The are executed from
173179 directory plugins. Put symbolic links from plugins to plugin-lib,
174
-and name them according to the order you want them to run.
180
+and name them according to the order you want them to run. This is not
181
+necessary if a test case being run requires a specific plugin to work.
175182
176183 Example:
177184
....@@ -223,7 +230,8 @@
223230 - rootPlugin.py:
224231 implements the enforcement of running as root
225232 - nsPlugin.py:
226
- sets up a network namespace and runs all commands in that namespace
233
+ sets up a network namespace and runs all commands in that namespace,
234
+ while also setting up dummy devices to be used in testing.
227235 - valgrindPlugin.py
228236 runs each command in the execute stage under valgrind,
229237 and checks for leaks.
....@@ -232,6 +240,8 @@
232240 and the other is a test whether the command leaked memory or not.
233241 (This one is a preliminary version, it may not work quite right yet,
234242 but the overall template is there and it should only need tweaks.)
243
+ - buildebpfPlugin.py:
244
+ builds all programs in $EBPFDIR.
235245
236246
237247 ACKNOWLEDGEMENTS