Skip to content

Commit 8337a0d

Browse files
yuwatajouyouyun
authored andcommitted
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
1 parent 81a29ad commit 8337a0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/units/TEST-75-RESOLVED.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ monitor_check_rr() (
6464
)
6565

6666
restart_resolved() {
67+
systemctl stop systemd-resolved-monitor.socket systemd-resolved-varlink.socket
6768
systemctl stop systemd-resolved.service
6869
(! systemctl is-failed systemd-resolved.service)
6970
# Reset the restart counter since we call this method a bunch of times
7071
# and can occasionally hit the default rate limit
7172
systemctl reset-failed systemd-resolved.service
73+
systemctl start systemd-resolved-monitor.socket systemd-resolved-varlink.socket
7274
systemctl start systemd-resolved.service
7375
}
7476

@@ -333,6 +335,7 @@ manual_testcase_02_mdns_llmnr() {
333335
} >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf
334336
restart_resolved
335337
# make sure networkd is not running.
338+
systemctl stop systemd-networkd.socket systemd-networkd-varlink.socket
336339
systemctl stop systemd-networkd.service
337340
assert_in 'no' "$(resolvectl mdns hoge)"
338341
assert_in 'no' "$(resolvectl llmnr hoge)"
@@ -1367,7 +1370,9 @@ testcase_15_wait_online_dns() {
13671370
resolvectl domain dns0 ""
13681371

13691372
# Stop systemd-resolved before calling systemd-networkd-wait-online. It should retry connections.
1373+
systemctl stop systemd-resolved-monitor.socket systemd-resolved-varlink.socket
13701374
systemctl stop systemd-resolved.service
1375+
systemctl start systemd-resolved-monitor.socket systemd-resolved-varlink.socket
13711376

13721377
# Begin systemd-networkd-wait-online --dns
13731378
systemd-run -u "$unit" -p "Environment=SYSTEMD_LOG_LEVEL=debug" -p "Environment=SYSTEMD_LOG_TARGET=journal" --service-type=exec \

0 commit comments

Comments
 (0)