]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-17: use 'udevadm control --reload' or 'systemctl reload systemd-udevd.service... 35458/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 3 Dec 2024 21:34:43 +0000 (06:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Dec 2024 10:00:38 +0000 (19:00 +0900)
These should be equivalent. For coverage, one subtest uses systemctl and
another uses udevadm.

test/units/TEST-17-UDEV.03.sh
test/units/TEST-17-UDEV.device_is_processing.sh

index d6b31622588fca4b8b63cbf3fea44689a068a11c..56ecf49e3b06e215f8773fc49eea398ea517e4d8 100755 (executable)
@@ -27,7 +27,7 @@ event_timeout=10
 timeout_signal=SIGABRT
 EOF
 
-    systemctl restart systemd-udevd.service
+    systemctl reload systemd-udevd.service
 }
 
 # shellcheck disable=SC2317
@@ -40,7 +40,7 @@ teardown() {
 
     rm -rf "$TMPDIR"
     rm -f "$TEST_RULE" "$TEST_CONF"
-    systemctl restart systemd-udevd.service
+    systemctl reload systemd-udevd.service
 }
 
 run_test_timeout() {
index 88e4b5a6bd37434e47773cb8f1fab447f5e6c9dd..d3b48e780e49c6831e16a5b12e9ccad8873cee57 100755 (executable)
@@ -18,7 +18,7 @@ at_exit() {
     # Forcibly kills sleep command invoked by the udev rule before restarting,
     # otherwise systemctl restart below will takes longer.
     killall -KILL sleep
-    systemctl restart systemd-udevd.service
+    udevadm control --reload
     ip link del "$IFNAME"
 }
 
@@ -36,7 +36,7 @@ cat >/run/udev/rules.d/99-testsuite.rules <<EOF
 SUBSYSTEM=="net", ACTION=="change", KERNEL=="${IFNAME}", OPTIONS="log_level=debug", RUN+="/usr/bin/sleep 1000"
 EOF
 
-systemctl restart systemd-udevd.service
+udevadm control --reload
 
 ip link add "$IFNAME" type dummy
 IFINDEX=$(ip -json link show "$IFNAME" | jq '.[].ifindex')