|author||Brenda J. Butler <email@example.com>||2018-02-14 14:09:21 -0500|
|committer||David S. Miller <firstname.lastname@example.org>||2018-02-15 15:38:33 -0500|
|parent||tools: tc-testing: Refactor test-runner (diff)|
tools: tc-testing: Introduce plugin architecture
This should be a general test architecture, and yet allow specific tests to be done. Introduce a plugin architecture. An individual test has 4 stages, setup/execute/verify/teardown. Each plugin gets a chance to run a function at each stage, plus one call before all the tests are called ("pre" suite) and one after all the tests are called ("post" suite). In addition, just before each command is executed, the plugin gets a chance to modify the command using the "adjust_command" hook. This makes the test suite quite flexible. Future patches will take some functionality out of the tdc.py script and place it in plugins. To use the plugins, place the implementation in the plugins directory and run tdc.py. It will notice the plugins and use them. Signed-off-by: Brenda J. Butler <email@example.com> Acked-by: Lucas Bates <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com>
Diffstat (limited to 'tools/testing/selftests/tc-testing/plugin-lib/README-PLUGINS')
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/plugin-lib/README-PLUGINS b/tools/testing/selftests/tc-testing/plugin-lib/README-PLUGINS
new file mode 100644
@@ -0,0 +1,27 @@
+tdc.py will look for plugins in a directory plugins off the cwd.
+Make a set of numbered symbolic links from there to the actual plugins.
+ 10-rootPlugin.py -> ../plugin-lib/rootPlugin.py
+ 20-valgrindPlugin.py -> ../plugin-lib/valgrindPlugin.py
+ 30-nsPlugin.py -> ../plugin-lib/nsPlugin.py
+tdc.py will find them and use them.
+ Check if the uid is root. If not, bail out.
+ Run the command under test with valgrind, and produce an extra set of TAP results for the memory tests.
+ This plugin will write files to the cwd, called vgnd-xxx.log. These will contain
+ the valgrind output for test xxx. Any file matching the glob 'vgnd-*.log' will be
+ deleted at the end of the run.
+ Run all the commands in a network namespace.