From f88f0271f84f11643fa20198e2346a2ec4e629ed Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 19 Oct 2025 12:38:35 +0900 Subject: [PATCH] TEST-75-RESOLVED: stop socket units before stopping the main service Fixes the following warning: TEST-75-RESOLVED.sh[2251]: ++ restart_resolved TEST-75-RESOLVED.sh[2251]: ++ systemctl stop systemd-resolved.service TEST-75-RESOLVED.sh[2271]: Stopping 'systemd-resolved.service', but its triggering units are still active: TEST-75-RESOLVED.sh[2271]: systemd-resolved-monitor.socket, systemd-resolved-varlink.socket --- test/units/TEST-75-RESOLVED.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/units/TEST-75-RESOLVED.sh b/test/units/TEST-75-RESOLVED.sh index 53985d96860..b40856f6639 100755 --- a/test/units/TEST-75-RESOLVED.sh +++ b/test/units/TEST-75-RESOLVED.sh @@ -64,11 +64,13 @@ monitor_check_rr() ( ) restart_resolved() { + systemctl stop systemd-resolved-monitor.socket systemd-resolved-varlink.socket systemctl stop systemd-resolved.service (! systemctl is-failed systemd-resolved.service) # Reset the restart counter since we call this method a bunch of times # and can occasionally hit the default rate limit systemctl reset-failed systemd-resolved.service + systemctl start systemd-resolved-monitor.socket systemd-resolved-varlink.socket systemctl start systemd-resolved.service } @@ -333,6 +335,7 @@ manual_testcase_02_mdns_llmnr() { } >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf restart_resolved # make sure networkd is not running. + systemctl stop systemd-networkd.socket systemd-networkd-varlink.socket systemctl stop systemd-networkd.service assert_in 'no' "$(resolvectl mdns hoge)" assert_in 'no' "$(resolvectl llmnr hoge)" @@ -1367,7 +1370,9 @@ testcase_15_wait_online_dns() { resolvectl domain dns0 "" # Stop systemd-resolved before calling systemd-networkd-wait-online. It should retry connections. + systemctl stop systemd-resolved-monitor.socket systemd-resolved-varlink.socket systemctl stop systemd-resolved.service + systemctl start systemd-resolved-monitor.socket systemd-resolved-varlink.socket # Begin systemd-networkd-wait-online --dns systemd-run -u "$unit" -p "Environment=SYSTEMD_LOG_LEVEL=debug" -p "Environment=SYSTEMD_LOG_TARGET=journal" --service-type=exec \ -- 2.47.3