diff options
author | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-02-10 03:30:44 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-09 21:30:44 -0500 |
commit | d26fdaa236e9c6fd8e74e8644a47972be3a8ace4 (patch) | |
tree | d79f10ea39fe48fe5601ee0e92c3f3ff1b5afd8a /test/networkd-test.py | |
parent | 7961116e2c5bd12ef8c6ddb574239d60a10b5622 (diff) | |
download | systemd-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-x | test/networkd-test.py | 6 |
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 |