From 2fe30e9abe1c0b72246aa1569477bb6cc75a922a Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Wed, 22 Oct 2025 16:44:21 -0700 Subject: [PATCH] run-vmtest: update vmtest configuration Bump vmtest [1] version to 0.18.0 Factor out vmtest cli args into a proper .toml configuration. Set num_cpus to 4 (default was 2), to enable additional BPF selftests. Signed-off-by: Ihor Solodrai --- run-vmtest/action.yml | 2 +- run-vmtest/install-dependencies.sh | 2 +- run-vmtest/run.sh | 11 +++++++---- run-vmtest/vmtest.toml | 13 +++++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 run-vmtest/vmtest.toml diff --git a/run-vmtest/action.yml b/run-vmtest/action.yml index 55b2dec..ac9aa18 100644 --- a/run-vmtest/action.yml +++ b/run-vmtest/action.yml @@ -30,7 +30,7 @@ inputs: vmtest-release: description: 'Release version of vmtest tool to use' required: false - default: 'v0.15.0' + default: 'v0.18.0' runs: using: "composite" diff --git a/run-vmtest/install-dependencies.sh b/run-vmtest/install-dependencies.sh index 1106d72..e7cd894 100755 --- a/run-vmtest/install-dependencies.sh +++ b/run-vmtest/install-dependencies.sh @@ -2,7 +2,7 @@ set -euo pipefail -VMTEST_RELEASE=${VMTEST_RELEASE:-v0.15.0} +VMTEST_RELEASE=${VMTEST_RELEASE:-v0.18.0} VMTEST_URL="https://github.com/danobi/vmtest/releases/download/${VMTEST_RELEASE}/vmtest-$(uname -m)" sudo curl -L $VMTEST_URL -o /usr/bin/vmtest sudo chmod 755 /usr/bin/vmtest diff --git a/run-vmtest/run.sh b/run-vmtest/run.sh index 7a8527c..780bdc7 100755 --- a/run-vmtest/run.sh +++ b/run-vmtest/run.sh @@ -86,10 +86,13 @@ foldable start vmtest "Starting virtual machine..." # Tests may be comma-separated. vmtest_selftest expect them to come from CLI space-separated. TEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ') -vmtest -k "${VMLINUZ}" --kargs "panic=-1 sysctl.vm.panic_on_oom=1" \ - "${GITHUB_ACTION_PATH}/vmtest-init.sh && \ - cd '${GITHUB_WORKSPACE}' && \ - ${VMTEST_SCRIPT} ${TEST_RUNNERS}" + +export VMLINUZ TEST_RUNNERS VMTEST_SCRIPT +VMTEST_TOML=$(mktemp /tmp/vmtest.XXXXXX.toml) +envsubst < "${GITHUB_ACTION_PATH}/vmtest.toml" > $VMTEST_TOML +echo "cat $VMTEST_TOML" +cat $VMTEST_TOML +vmtest -c $VMTEST_TOML # fixup traffic montioring log paths if present PCAP_DIR=/tmp/tmon_pcap diff --git a/run-vmtest/vmtest.toml b/run-vmtest/vmtest.toml new file mode 100644 index 0000000..7db59f9 --- /dev/null +++ b/run-vmtest/vmtest.toml @@ -0,0 +1,13 @@ +[[target]] +name = "run-vmtest" +kernel = "${VMLINUZ}" +kernel_args = "panic=-1 sysctl.vm.panic_on_oom=1" +command = """\ +${GITHUB_ACTION_PATH}/vmtest-init.sh && \ +cd ${GITHUB_WORKSPACE} && \ +${VMTEST_SCRIPT} ${TEST_RUNNERS} \ +""" + +[target.vm] +num_cpus = 4 +