summaryrefslogtreecommitdiff
path: root/test/networkd-test.py
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@users.noreply.github.com>2017-02-10 03:30:44 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-09 21:30:44 -0500
commitd26fdaa236e9c6fd8e74e8644a47972be3a8ace4 (patch)
treed79f10ea39fe48fe5601ee0e92c3f3ff1b5afd8a /test/networkd-test.py
parent7961116e2c5bd12ef8c6ddb574239d60a10b5622 (diff)
downloadsystemd-d26fdaa236e9c6fd8e74e8644a47972be3a8ace4.tar.gz
systemd-d26fdaa236e9c6fd8e74e8644a47972be3a8ace4.tar.bz2
systemd-d26fdaa236e9c6fd8e74e8644a47972be3a8ace4.zip
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.
Diffstat (limited to 'test/networkd-test.py')
-rwxr-xr-xtest/networkd-test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/networkd-test.py b/test/networkd-test.py
index 8599398c1c..e0dddeb053 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