]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: show journal on systemd-resolved.service failures (#5297)
authorMartin Pitt <martinpitt@users.noreply.github.com>
Fri, 10 Feb 2017 02:30:44 +0000 (03:30 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Feb 2017 02:30:44 +0000 (21:30 -0500)
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

index 8599398c1c21b999727e958fc1586058daefdf98..e0dddeb05389bc8cc734b3a9309c595bb3f81384 100755 (executable)
@@ -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