mirror of
https://github.com/systemd/systemd.git
synced 2026-08-12 22:17:19 +00:00
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 abe3d570f8.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user