From 88488e0e97d1058725e1cb6c0fa94e771e2fcf34 Mon Sep 17 00:00:00 2001 From: Hector Cao Date: Sun, 20 Oct 2024 21:16:05 +0000 Subject: [PATCH] tests : fix vsock test failure in checkbox checkbox22/24 comes with the iperf3 package it will mask the iperf-vsock tool we install on the host this tool should be bundled in the snap --- .../checkbox-provider-tdx/units/tests/jobs.pxu | 10 ++++++++++ tests/snap/snapcraft.yaml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/tests/checkbox/checkbox-provider-tdx/units/tests/jobs.pxu b/tests/checkbox/checkbox-provider-tdx/units/tests/jobs.pxu index 0b94df3..df7a51a 100644 --- a/tests/checkbox/checkbox-provider-tdx/units/tests/jobs.pxu +++ b/tests/checkbox/checkbox-provider-tdx/units/tests/jobs.pxu @@ -235,8 +235,18 @@ depends: after: requires: executable.name == 'qemu-system-x86_64' + executable.name == 'iperf3' command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH + # The order of binary look-up: + # - test working folder + # - checkbox + # - provider + # - snaps binaries (/snap/bin) + # - host system + # so for iperf3, the binary from the checkbox snap will be used. + # however we want to use the one from tdx provider (that has vsock support) + export PATH=${SNAP}/usr/bin/:${PATH} setup-env-and-run test_vsock_vm.py id: tdx-guest/td-memory diff --git a/tests/snap/snapcraft.yaml b/tests/snap/snapcraft.yaml index 7610e14..de15307 100644 --- a/tests/snap/snapcraft.yaml +++ b/tests/snap/snapcraft.yaml @@ -74,6 +74,10 @@ passthrough: configure: command-chain: [bin/wrapper_local] +package-repositories: + - type: apt + ppa: kobuk-team/testing + parts: checkbox-provider-tdx: plugin: dump @@ -88,6 +92,7 @@ parts: - python3-pytest - sshpass - cpuid + - iperf-vsock override-build: | # the validation tool needs to access the to all checkbox providers # we have to set the PROVIDERPATH to point to them