]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for network interface reconfigured after updating config
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 May 2024 05:21:10 +0000 (14:21 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 10 May 2024 07:16:21 +0000 (09:16 +0200)
Otherwise, at this stage, the interface may be in e.g. initialized or
pending state, and the drop-in file introduced by the previous command
may not be registered to the state file for the interface.

Fixes #32685.

test/units/testsuite-74.networkctl.sh

index d05de17bde059916e242e2514529a12e74d01773..3e333a2eabe8bb72361142a83ed5e9adb4e890d7 100755 (executable)
@@ -106,6 +106,7 @@ networkctl cat @test2:network | cmp - <(networkctl cat "$NETWORK_NAME")
 EDITOR='cp' script -ec 'networkctl edit @test2 --drop-in test2.conf' /dev/null
 cmp "+4" "/etc/systemd/network/${NETWORK_NAME}.d/test2.conf"
 
+SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd-wait-online -i test2:carrier --timeout 20
 (! EDITOR='true' script -ec 'networkctl edit @test2 --runtime --drop-in test2.conf' /dev/null)
 
 ip_link="$(ip link show test2)"