]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for interface to come online before checking DNS scopes
authorNick Rosbrook <enr0n@ubuntu.com>
Fri, 14 Nov 2025 14:37:21 +0000 (09:37 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 14 Nov 2025 19:04:51 +0000 (04:04 +0900)
The current test is flaky because it creates a new interface definition,
calls networkctl reload, and then calls resolvectl show-cache. If
resolved has not received the changes and setup the DNS scopes for the
interface, show-cache will be empty for that interface.

Part 2 of #39602

test/units/TEST-75-RESOLVED.sh

index 4d2257d6e0f9864bb2e83effeaaee5e83df54c51..f8e6ffa56df0a7d60ee90b02f69f9fabcf3ca3c8 100755 (executable)
@@ -828,6 +828,7 @@ testcase_09_resolvectl_showcache() {
     } > /run/systemd/network/10-dns2.network
     networkctl reload
     networkctl reconfigure dns2
+    /usr/lib/systemd/systemd-networkd-wait-online --timeout=60 --dns --interface=dns2
 
     mkdir -p /run/systemd/resolved.conf.d/
     {