Skip to content

Commit 4f439f5

Browse files
committed
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 <[email protected]>
1 parent dc6aea4 commit 4f439f5

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

run-vmtest/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ inputs:
3030
vmtest-release:
3131
description: 'Release version of vmtest tool to use'
3232
required: false
33-
default: 'v0.15.0'
33+
default: 'v0.18.0'
3434

3535
runs:
3636
using: "composite"

run-vmtest/run.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ foldable start vmtest "Starting virtual machine..."
8686

8787
# Tests may be comma-separated. vmtest_selftest expect them to come from CLI space-separated.
8888
TEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ')
89-
vmtest -k "${VMLINUZ}" --kargs "panic=-1 sysctl.vm.panic_on_oom=1" \
90-
"${GITHUB_ACTION_PATH}/vmtest-init.sh && \
91-
cd '${GITHUB_WORKSPACE}' && \
92-
${VMTEST_SCRIPT} ${TEST_RUNNERS}"
89+
90+
export VMLINUZ TEST_RUNNERS VMTEST_SCRIPT
91+
VMTEST_TOML=$(mktemp /tmp/vmtest.XXXXXX.toml)
92+
envsubst < "${GITHUB_ACTION_PATH}/vmtest.toml" > $VMTEST_TOML
93+
echo "cat $VMTEST_TOML"
94+
cat $VMTEST_TOML
95+
vmtest -c $VMTEST_TOML
9396

9497
# fixup traffic montioring log paths if present
9598
PCAP_DIR=/tmp/tmon_pcap

run-vmtest/vmtest.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[target]]
2+
name = "run-vmtest"
3+
kernel = "${VMLINUZ}"
4+
kernel_args = "panic=-1 sysctl.vm.panic_on_oom=1"
5+
command = """\
6+
${GITHUB_ACTION_PATH}/vmtest-init.sh && \
7+
cd ${GITHUB_WORKSPACE} && \
8+
${VMTEST_SCRIPT} ${TEST_RUNNERS} \
9+
"""
10+
11+
[target.vm]
12+
num_cpus = 4
13+

0 commit comments

Comments
 (0)