Skip to content

Commit

Permalink
Merge pull request #23980 from yuwata/test-network
Browse files Browse the repository at this point in the history
test-network: tiny output improvements
  • Loading branch information
yuwata authored Jul 11, 2022
2 parents 1279994 + e755ad6 commit 12a2332
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test-network/systemd-networkd-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def check_output(*command, text=True, **kwargs):
return subprocess.run(command, check=True, universal_newlines=text, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs).stdout.rstrip()

def call(*command, text=True, **kwargs):
# This returns returncode. stdout and stderr are shown in console
# This returns returncode. stdout and stderr are merged and shown in console
command = command[0].split() + list(command[1:])
return subprocess.run(command, check=False, universal_newlines=text, **kwargs).returncode
return subprocess.run(command, check=False, universal_newlines=text, stderr=subprocess.STDOUT, **kwargs).returncode

def call_quiet(*command, text=True, **kwargs):
command = command[0].split() + list(command[1:])
Expand Down Expand Up @@ -431,7 +431,7 @@ def flush(ipv, saved_rules):
have = True
print(f'### Removing IPv{ipv} routing policy rules that did not exist when the test started.')
print(f'# {line}')
words = line.split()
words = line.replace('lookup [l3mdev-table]', 'l3mdev').split()
priority = words[0].rstrip(':')
call(f'ip -{ipv} rule del priority {priority} ' + ' '.join(words[1:]))

Expand Down

0 comments on commit 12a2332

Please sign in to comment.