CI: wait for the network interface in PCI passthrough tests

The network driver initializes asynchronously, and it may not be ready
yet by the time the startup script is called. This is especially the
case for USB network adapter (where the PCI device is the USB
controller) in the upcoming runner.

Don't bother about separate timeout - test timeout will cover this part
too.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Marek Marczykowski-Górecki authored and Andrew Cooper committed 2025-04-07 19:17:38 +01:00
1 parent 5606b982ac
commit 6e3fe711fb
1 file changed
+1
+1
View File
@@ -104,6 +104,7 @@ on_reboot = "destroy"
domU_check=" domU_check="
set -x -e set -x -e
interface=eth0 interface=eth0
while ! [ -e \"/sys/class/net/\$interface\" ]; do sleep 1; done
ip link set \"\$interface\" up ip link set \"\$interface\" up
timeout 30s udhcpc -i \"\$interface\" timeout 30s udhcpc -i \"\$interface\"
pingip=\$(ip -o -4 r show default|cut -f 3 -d ' ') pingip=\$(ip -o -4 r show default|cut -f 3 -d ' ')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.