From: Yu Watanabe Date: Wed, 20 May 2026 14:40:51 +0000 (+0900) Subject: test-network: try to stop test-modem-manager-mock.service only when necessary X-Git-Tag: v261-rc1~54^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18f2e9bcfaa81223b47f9ec6a65998219902eaba;p=thirdparty%2Fsystemd.git test-network: try to stop test-modem-manager-mock.service only when necessary Otherwise, all test cases that does not create/start the service emits the following error: ``` Failed to stop test-modem-manager-mock.service: Unit test-modem-manager-mock.service not loaded. ``` Moreover, without this change, extra 'systemctl daemon-reload' is triggered after all test cases. That's super heavy, especially when the test is running on sanitizers. Follow-up for abe3d570f8006fca5138b2d5cfb4e8b530be02e5. --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 9a8b38a88fa..877075ec5cd 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1210,7 +1210,6 @@ def tear_down_common(): stop_dnsmasq() stop_isc_dhcpd() stop_radvd() - stop_modem_manager_mock() # 2. remove modules call_quiet('rmmod netdevsim') @@ -10884,6 +10883,7 @@ class NetworkdWWANTests(unittest.TestCase, Utilities): setup_common() def tearDown(self): + stop_modem_manager_mock() tear_down_common() def test_wwan_ipv4v6_static(self):