diff options
| author | Pedro Tammela <[email protected]> | 2023-11-24 15:42:47 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-11-28 02:15:43 +0000 |
| commit | 501679f5d4a433144ae755dd2e5f757b1ce5a152 (patch) | |
| tree | 73191fd874c2c606b381fcd6fe879115a8e20417 /tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py | |
| parent | selftests: tc-testing: prefix iproute2 functions with "ipr2" (diff) | |
| download | kernel-501679f5d4a433144ae755dd2e5f757b1ce5a152.tar.gz kernel-501679f5d4a433144ae755dd2e5f757b1ce5a152.zip | |
selftests: tc-testing: cleanup on Ctrl-C
Cleanup net namespaces and other resources if we get a SIGINT (Ctrl-C).
As user visible resources are allocated on a per test basis, it's only
required to catch this condition when (possibly) running tests.
So far calling post_suite is enough to free up anything that might
linger.
A missing keyword replacement for nsPlugin is also included.
Signed-off-by: Pedro Tammela <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py')
| -rw-r--r-- | tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py b/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py index dc7a0597cf44..77b1106b8388 100644 --- a/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py +++ b/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py @@ -78,7 +78,7 @@ class SubPlugin(TdcPlugin): print('{}.post_suite'.format(self.sub_class)) # Make sure we don't leak resources - cmd = "$IP -a netns del" + cmd = self._replace_keywords("$IP -a netns del") if self.args.verbose > 3: print('_exec_cmd: command "{}"'.format(cmd)) |
