From: Martin Pitt Date: Fri, 10 Feb 2017 02:30:44 +0000 (+0100) Subject: tests: show journal on systemd-resolved.service failures (#5297) X-Git-Tag: v233~124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d26fdaa236e9c6fd8e74e8644a47972be3a8ace4;p=thirdparty%2Fsystemd.git tests: show journal on systemd-resolved.service failures (#5297) In networkd-test.py, show resolved's journal on failure, to debug issues like https://github.com/systemd/systemd/pull/5283. --- diff --git a/test/networkd-test.py b/test/networkd-test.py index 8599398c1c2..e0dddeb0538 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -201,7 +201,11 @@ class ClientTestBase(NetworkdTestingUtilities): def do_test(self, coldplug=True, ipv6=False, extra_opts='', online_timeout=10, dhcp_mode='yes'): - subprocess.check_call(['systemctl', 'start', 'systemd-resolved']) + try: + subprocess.check_call(['systemctl', 'start', 'systemd-resolved']) + except subprocess.CalledProcessError: + self.show_journal('systemd-resolved.service') + raise self.write_network(self.config, '''\ [Match] Name=%s