From: Frantisek Sumsal Date: Tue, 30 Jul 2019 18:27:34 +0000 (+0200) Subject: test: print an error when networkctl returns an unexpected EC X-Git-Tag: v243-rc2~71^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13225%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/test/networkd-test.py b/test/networkd-test.py index c971570346c..beb3bd9e1df 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