3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 18:38:48 +02:00

test-runner: Fix verbose check for processes in namespaces

Check whether verbose output is enabled for process name arg[0] before
prepending the "ip netns exec" part to arg since arg[0] is going to be
"ip" after that.
This commit is contained in:
Andrew Zaborowski 2021-08-28 05:10:54 +02:00 committed by Denis Kenzior
parent 5b7ec7689a
commit c79f583e0c

View File

@ -176,12 +176,12 @@ class Process(subprocess.Popen):
global config global config
self.ctx = config.ctx self.ctx = config.ctx
if namespace:
args = ['ip', 'netns', 'exec', namespace] + args
if self.ctx.is_verbose(args[0], log=False): if self.ctx.is_verbose(args[0], log=False):
self.verbose = True self.verbose = True
if namespace:
args = ['ip', 'netns', 'exec', namespace] + args
if outfile: if outfile:
self._append_outfile(outfile) self._append_outfile(outfile)