From 59ab68bd8881cb4dde863ac2248abcc1b95d7886 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Wed, 15 Oct 2025 15:46:30 +0300 Subject: [PATCH] test: Wait for iper3 server Turns out that iperf3 is using the `simple` service type: $ sudo systemctl show iperf3 | grep ^Type= Type=simple In this case `systemctl start iperf3` does not wait for the service to signal that it is ready to handle requests or has finished initializing, so we may return before the service is ready to serve requests. We wait now until iperf3 port is in listening state. Signed-off-by: Nir Soffer --- .github/workflows/lima.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/lima.yaml b/.github/workflows/lima.yaml index 9c4ccbf..138fd49 100644 --- a/.github/workflows/lima.yaml +++ b/.github/workflows/lima.yaml @@ -65,6 +65,14 @@ jobs: limactl shell vm1 sudo apt-get update limactl shell vm1 sudo apt-get install -y iperf3 limactl shell vm1 sudo systemctl start iperf3.service + echo "Waiting for iperf3 server ..." + limactl shell vm1 bash -s << EOF + if ! timeout 10s bash -c "until ss -tln | grep -q :5201; do sleep 1; done"; then + echo >&2 "Timeout waiting for iperf3 port" + exit 1 + fi + EOF + echo "iperf3 server is ready" - name: "Lima: vm1: get the IP" run: | limactl shell vm1 ip -4 -json addr show dev lima0 | jq -r .[0].addr_info[0].local | tee /tmp/vm1_iP