Skip to content

Commit fb4c476

Browse files
committed
CI: Add test for Slirp network devices
Ping 10.0.2.2 (default route) as hosted runner in Azure do not allow external pings.
1 parent 568bf26 commit fb4c476

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.ci/test-netdev.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ ASSERT expect <<DONE
4545
expect "riscv32 GNU/Linux" { send "ip l set eth0 up\n" } timeout { exit 3 }
4646
expect "# " { send "ip a add 192.168.10.2/24 dev eth0\n" }
4747
expect "# " { send "ping -c 3 192.168.10.1\n" }
48-
expect "3 packets transmitted, 3 packets received, 0% packet loss" { } timeout { exit 4 }
48+
expect "3 packets transmitted, 3 packets received, 0% packet loss" { } timeout { exit 4 }
4949
} elseif { "$NETDEV" == "user" } {
50-
# Test slirp configuration
51-
expect "riscv32 GNU/Linux" { send "\x01"; send "x" } timeout { exit 3 }
50+
expect "riscv32 GNU/Linux" { send "ip addr add 10.0.2.15/24 dev eth0\n" } timeout { exit 3 }
51+
expect "# " { send "ip link set eth0 up\n"}
52+
expect "# " { send "ip route add default via 10.0.2.2\n"}
53+
expect "# " { send "ping -c 3 10.0.2.2\n" }
54+
expect "3 packets transmitted, 3 packets received, 0% packet loss" { } timeout { exit 4 }
5255
}
5356
DONE
5457
}

0 commit comments

Comments
 (0)