diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-07-11 22:31:12 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-07-11 22:38:21 +0200 |
commit | b5dac5b0de69d748fc1e58936b64e2e4745a83f2 (patch) | |
tree | 8fb8f1283e36ccae14a81c8e1b1d2714397f5b7a | |
parent | man: explain why pam_systemd_home wants to be in all four stacks (diff) | |
download | systemd-b5dac5b0de69d748fc1e58936b64e2e4745a83f2.tar.xz systemd-b5dac5b0de69d748fc1e58936b64e2e4745a83f2.zip |
test-network: merge stdout and stderr of invoked command by call()
Otherwise, the logs may be messed up.
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 1e78b966aa..a7ac4dbec5 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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:]) |