From: Yu Watanabe Date: Sat, 13 Aug 2022 18:56:01 +0000 (+0900) Subject: test-network: use "systemctl restart" to restart networkd X-Git-Tag: v252-rc1~451^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24305%2Fhead;p=thirdparty%2Fsystemd.git test-network: use "systemctl restart" to restart networkd --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 4a3fe4279dc..ca96f794282 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -601,8 +601,11 @@ def start_networkd(): check_output('systemctl start systemd-networkd') def restart_networkd(show_logs=True): - stop_networkd(show_logs) - start_networkd() + if show_logs: + invocation_id = check_output('systemctl show systemd-networkd.service -p InvocationID --value') + check_output('systemctl restart systemd-networkd.service') + if show_logs: + print(check_output('journalctl _SYSTEMD_INVOCATION_ID=' + invocation_id)) def networkctl_reconfigure(*links): check_output(*networkctl_cmd, 'reconfigure', *links, env=env)