From d26fdaa236e9c6fd8e74e8644a47972be3a8ace4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 10 Feb 2017 03:30:44 +0100 Subject: [PATCH] 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. --- test/networkd-test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.3