Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run-vmtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion run-vmtest/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 26 additions & 4 deletions run-vmtest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
[[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 = ${VMTEST_NUM_CPUS}
memory = "${VMTEST_MEMORY}"
EOF

foldable start vmtest_toml "$VMTEST_TOML"
cat $VMTEST_TOML
foldable end vmtest_toml

vmtest -c $VMTEST_TOML

# fixup traffic montioring log paths if present
PCAP_DIR=/tmp/tmon_pcap
Expand Down
Loading