]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: tentatively stops .socket units for udevd 14836/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 9 Feb 2020 15:43:58 +0000 (00:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 9 Feb 2020 15:51:00 +0000 (00:51 +0900)
To suppress the following warning:
---
Warning: Stopping systemd-udevd.service, but it can still be activated by:
  systemd-udevd-control.socket
  systemd-udevd-kernel.socket

test/test-network/systemd-networkd-tests.py

index 0210c7bfaeacfc7211f3fbca8cfa3ae54907e9b7..c1a84ca9ec064c2233f72720ad9c93f1f697fdea 100755 (executable)
@@ -165,7 +165,9 @@ def setUpModule():
     shutil.rmtree(networkd_ci_path)
     copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'conf'), networkd_ci_path)
 
-    for u in ['systemd-networkd.socket', 'systemd-networkd.service', 'systemd-resolved.service', 'systemd-udevd.service', 'firewalld.service']:
+    for u in ['systemd-networkd.socket', 'systemd-networkd.service', 'systemd-resolved.service',
+              'systemd-udevd-kernel.socket', 'systemd-udevd-control.socket', 'systemd-udevd.service',
+              'firewalld.service']:
         if call(f'systemctl is-active --quiet {u}') == 0:
             check_output(f'systemctl stop {u}')
             running_units.append(u)
@@ -249,13 +251,14 @@ def tearDownModule():
 
     shutil.rmtree(networkd_ci_path)
 
-    for u in ['systemd-networkd.service', 'systemd-resolved.service', 'systemd-udevd.service']:
+    for u in ['systemd-networkd.service', 'systemd-resolved.service']:
         check_output(f'systemctl stop {u}')
 
     shutil.rmtree('/run/systemd/system/systemd-networkd.service.d')
     shutil.rmtree('/run/systemd/system/systemd-resolved.service.d')
     shutil.rmtree('/run/systemd/system/systemd-udevd.service.d')
     check_output('systemctl daemon-reload')
+    check_output('systemctl restart systemd-udevd.service')
 
     for u in running_units:
         check_output(f'systemctl start {u}')