From 5fed4a377d21e09c2340cfe940d023f6b3bc14a1 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Fri, 22 Nov 2024 23:26:25 +0200 Subject: [PATCH 1/2] ci: Cleanup iperf3 tests - Start iperf3 service instead of using systemd run since this is the standard way to start the server. - Use iperf3-darwin since it provides additional info (RTT). With this changes the macos-15 test is successful: https://github.com/lima-vm/socket_vmnet/actions/runs/11980467424/job/33404783754 Signed-off-by: Nir Soffer --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a2b8fe..c39e0b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,13 +87,13 @@ jobs: - name: "Lima: vm1: set up iperf3" run: | limactl shell vm1 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3 - limactl shell vm1 systemd-run --user --unit=iperf3 iperf3 -s + limactl shell vm1 sudo systemctl start iperf3.service - 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 - name: "Lima: vm1: iperf3 (host -> vm1)" run: | - iperf3 -c "$(cat /tmp/vm1_ip)" + iperf3-darwin -c "$(cat /tmp/vm1_ip)" - name: "Lima: vm1: debug" if: failure() run: tail -n500 ~/.lima/vm1/*.log From f469a40f49bd0a1c0f9dfbd23c82e4f604c415b7 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 23 Nov 2024 00:29:25 +0200 Subject: [PATCH 2/2] ci: Simplify limactl start command By specifying memory and cpus in the vm yaml. Signed-off-by: Nir Soffer --- .github/workflows/test.yml | 4 ++-- test/vmnet.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c39e0b4..b8de60a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,7 @@ jobs: run: brew install iperf3 jq - name: "Lima: vm1: prepare" run: | - limactl start --name=vm1 --set '.cpus=1 | .memory = "1GiB"' --tty=false ./test/vmnet.yaml + limactl start --name=vm1 --tty=false ./test/vmnet.yaml limactl shell vm1 ip a - name: "Lima: vm1: set up iperf3" run: | @@ -99,7 +99,7 @@ jobs: run: tail -n500 ~/.lima/vm1/*.log - name: "Lima: vm2: prepare" run: | - limactl start --name=vm2 --set '.cpus=1 | .memory = "1GiB"' --tty=false ./test/vmnet.yaml + limactl start --name=vm2 --tty=false ./test/vmnet.yaml limactl shell vm2 ip a - name: "Lima: vm2: set up iperf3" run: | diff --git a/test/vmnet.yaml b/test/vmnet.yaml index e597725..b6ce748 100644 --- a/test/vmnet.yaml +++ b/test/vmnet.yaml @@ -18,5 +18,7 @@ mounts: - location: "~" - location: "/tmp/lima" writable: true +memory: "1g" +cpus: 1 networks: - lima: shared