]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: adjust timeouts for testcase_15_wait_online_dns 39733/head
authorNick Rosbrook <enr0n@ubuntu.com>
Fri, 14 Nov 2025 19:13:07 +0000 (14:13 -0500)
committerNick Rosbrook <enr0n@ubuntu.com>
Fri, 14 Nov 2025 19:46:16 +0000 (14:46 -0500)
Do not set a timeout on the wait-online call, since there are timeout
calls later that will prevent the test from blocking forever. Increase
those timeout calls for slower CI runs.

test/units/TEST-75-RESOLVED.sh

index 0fa7e6ac72046557a2187bfa6d9c0311f343b449..232180ccf3269340fe5314330e7bfe96f2a54db2 100755 (executable)
@@ -1451,10 +1451,10 @@ testcase_15_wait_online_dns() {
 
     # 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 \
-        /usr/lib/systemd/systemd-networkd-wait-online --timeout=20 --dns --interface=dns0
+        /usr/lib/systemd/systemd-networkd-wait-online --timeout=0 --dns --interface=dns0
 
     # Wait until it blocks waiting for updated DNS config
-    timeout 10 bash -c "journalctl -b -u $unit -f | grep -q -m1 'dns0: No.*DNS server is accessible'"
+    timeout 30 bash -c "journalctl -b -u $unit -f | grep -q -m1 'dns0: No.*DNS server is accessible'"
 
     # Update the global configuration. Restart rather than reload systemd-resolved so that
     # systemd-networkd-wait-online has to re-connect to the varlink service.
@@ -1465,7 +1465,7 @@ testcase_15_wait_online_dns() {
     systemctl restart systemd-resolved.service
 
     # Wait for the monitor to exit gracefully.
-    timeout 10 bash -c "while systemctl --quiet is-active $unit; do sleep 0.5; done"
+    timeout 30 bash -c "while systemctl --quiet is-active $unit; do sleep 0.5; done"
     journalctl --sync
 
     # Check that a disconnect happened, and was handled.