diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-07-30 20:27:34 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-07-31 16:33:12 +0200 |
commit | 345997f393a5bb7dd5b8fe0327b28d7af21f07ae (patch) | |
tree | df06dfaf5786ef4df9e42f76732e09249c9d4ccd /test/networkd-test.py | |
parent | test: use `useradd` instead of `adduser` (diff) | |
download | systemd-345997f393a5bb7dd5b8fe0327b28d7af21f07ae.tar.xz systemd-345997f393a5bb7dd5b8fe0327b28d7af21f07ae.zip |
test: print an error when networkctl returns an unexpected EC
If networkctl crashes, like recently with SIGABRT, it returns absolutely
no output, which may be confusing during debugging. Help it a little
with a short informative message.
Diffstat (limited to 'test/networkd-test.py')
-rwxr-xr-x | test/networkd-test.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/networkd-test.py b/test/networkd-test.py index c971570346..beb3bd9e1d 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -420,7 +420,9 @@ DHCP={} subprocess.call(['ip', 'a', 'show', 'dev', self.iface]) print('---- networkctl status {} ----'.format(self.iface)) sys.stdout.flush() - subprocess.call(['networkctl', 'status', self.iface]) + rc = subprocess.call(['networkctl', 'status', self.iface]) + if rc != 0: + print("'networkctl status' exited with an unexpected code {}".format(rc)) self.show_journal('systemd-networkd.service') self.print_server_log() raise |