| .. | .. |
|---|
| 12 | 12 | * Minimum Python version of 3.4. Earlier 3.X versions may work but are not |
|---|
| 13 | 13 | guaranteed. |
|---|
| 14 | 14 | |
|---|
| 15 | | -* The kernel must have network namespace support |
|---|
| 15 | +* The kernel must have network namespace support if using nsPlugin |
|---|
| 16 | 16 | |
|---|
| 17 | 17 | * 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. |
|---|
| 19 | 19 | |
|---|
| 20 | 20 | * The kernel must have the appropriate infrastructure enabled to run all tdc |
|---|
| 21 | 21 | unit tests. See the config file in this directory for minimum required |
|---|
| .. | .. |
|---|
| 53 | 53 | execution by root uid has been moved into a plugin (see PLUGIN |
|---|
| 54 | 54 | ARCHITECTURE, below). |
|---|
| 55 | 55 | |
|---|
| 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. |
|---|
| 58 | 62 | |
|---|
| 59 | 63 | Running tdc without any arguments will run all tests. Refer to the section |
|---|
| 60 | 64 | on command line arguments for more information, or run: |
|---|
| .. | .. |
|---|
| 124 | 128 | -v, --verbose Show the commands that are being run |
|---|
| 125 | 129 | -N, --notap Suppress tap results for command under test |
|---|
| 126 | 130 | -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) |
|---|
| 128 | 134 | -P, --pause Pause execution just before post-suite stage |
|---|
| 129 | 135 | |
|---|
| 130 | 136 | selection: |
|---|
| .. | .. |
|---|
| 154 | 160 | netns: |
|---|
| 155 | 161 | options for nsPlugin (run commands in net namespace) |
|---|
| 156 | 162 | |
|---|
| 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. |
|---|
| 159 | 165 | |
|---|
| 160 | 166 | valgrind: |
|---|
| 161 | 167 | options for valgrindPlugin (run command under test under Valgrind) |
|---|
| .. | .. |
|---|
| 171 | 177 | |
|---|
| 172 | 178 | The plugins are in the directory plugin-lib. The are executed from |
|---|
| 173 | 179 | 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. |
|---|
| 175 | 182 | |
|---|
| 176 | 183 | Example: |
|---|
| 177 | 184 | |
|---|
| .. | .. |
|---|
| 223 | 230 | - rootPlugin.py: |
|---|
| 224 | 231 | implements the enforcement of running as root |
|---|
| 225 | 232 | - 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. |
|---|
| 227 | 235 | - valgrindPlugin.py |
|---|
| 228 | 236 | runs each command in the execute stage under valgrind, |
|---|
| 229 | 237 | and checks for leaks. |
|---|
| .. | .. |
|---|
| 232 | 240 | and the other is a test whether the command leaked memory or not. |
|---|
| 233 | 241 | (This one is a preliminary version, it may not work quite right yet, |
|---|
| 234 | 242 | but the overall template is there and it should only need tweaks.) |
|---|
| 243 | + - buildebpfPlugin.py: |
|---|
| 244 | + builds all programs in $EBPFDIR. |
|---|
| 235 | 245 | |
|---|
| 236 | 246 | |
|---|
| 237 | 247 | ACKNOWLEDGEMENTS |
|---|