From f5eec646103a86853fe9cbe221160c907a105987 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 Put vmtest cli args into a proper .toml configuration. Configure VMs num_cpus and memory with env variables. Co-developed-by: Puranjay Mohan Signed-off-by: Ihor Solodrai --- run-vmtest/action.yml | 2 +- run-vmtest/install-dependencies.sh | 2 +- run-vmtest/run.sh | 30 ++++++++++++++++++++++++++---- 3 files changed, 28 insertions(+), 6 deletions(-) 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 6359c88..855f105 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..6f53a9c 100755 --- a/run-vmtest/run.sh +++ b/run-vmtest/run.sh @@ -86,10 +86,32 @@ 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}" + +VMTEST_NUM_CPUS=${VMTEST_NUM_CPUS:-2} +VMTEST_MEMORY=${VMTEST_MEMORY:-4G} + +VMTEST_TOML=$(mktemp ./vmtest.XXXXXX.toml) +cat > $VMTEST_TOML <