Skip to content

Commit 56e16bc

Browse files
tammelakuba-moo
authored andcommitted
selftests: tc-testing: prefix iproute2 functions with "ipr2"
As suggested by Simon, prefix the functions that operate on iproute2 commands in contrast with the "nl" netlink prefix. Cc: Simon Horman <[email protected]> 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]>
1 parent 8059e68 commit 56e16bc

File tree

1 file changed

+8
-8
lines changed
  • tools/testing/selftests/tc-testing/plugin-lib

1 file changed

+8
-8
lines changed

tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def prepare_test(self, test):
3737
if netlink == True:
3838
self._nl_ns_create()
3939
else:
40-
self._ns_create()
40+
self._ipr2_ns_create()
4141

4242
# Make sure the netns is visible in the fs
4343
ticks = 20
@@ -71,7 +71,7 @@ def post_case(self):
7171
if netlink == True:
7272
self._nl_ns_destroy()
7373
else:
74-
self._ns_destroy()
74+
self._ipr2_ns_destroy()
7575

7676
def post_suite(self, index):
7777
if self.args.verbose:
@@ -161,7 +161,7 @@ def _nl_ns_create(self):
161161
ticks -= 1
162162
continue
163163

164-
def _ns_create_cmds(self):
164+
def _ipr2_ns_create_cmds(self):
165165
cmds = []
166166

167167
ns = self.args.NAMES['NS']
@@ -181,26 +181,26 @@ def _ns_create_cmds(self):
181181

182182
return cmds
183183

184-
def _ns_create(self):
184+
def _ipr2_ns_create(self):
185185
'''
186186
Create the network namespace in which the tests will be run and set up
187187
the required network devices for it.
188188
'''
189-
self._exec_cmd_batched('pre', self._ns_create_cmds())
189+
self._exec_cmd_batched('pre', self._ipr2_ns_create_cmds())
190190

191191
def _nl_ns_destroy(self):
192192
ns = self.args.NAMES['NS']
193193
netns.remove(ns)
194194

195-
def _ns_destroy_cmd(self):
195+
def _ipr2_ns_destroy_cmd(self):
196196
return self._replace_keywords('netns delete {}'.format(self.args.NAMES['NS']))
197197

198-
def _ns_destroy(self):
198+
def _ipr2_ns_destroy(self):
199199
'''
200200
Destroy the network namespace for testing (and any associated network
201201
devices as well)
202202
'''
203-
self._exec_cmd('post', self._ns_destroy_cmd())
203+
self._exec_cmd('post', self._ipr2_ns_destroy_cmd())
204204

205205
@cached_property
206206
def _proc(self):

0 commit comments

Comments
 (0)