From 4c92a627e264fc849a3aceeae0ad01cdc91244cc Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Mon, 17 Aug 2026 12:30:00 -0700 Subject: [PATCH 1/3] run-vmtest: make splat detection opt-in Existing action users do not necessarily carry kernel splat allowlist and denylist files. Treating a missing denylist as a detector failure therefore breaks those users when the v4 tag advances. Skip the detector when neither configured list path exists, while continuing to fail partial or invalid configurations once either file exists. With file presence as the feature gate, remove the test_progs-only check so configured test_maps and test_verifier runs are scanned too. Add regression coverage for configured paths with no list files. Assisted-by: Codex:GPT-5 Signed-off-by: Ihor Solodrai --- run-vmtest/README.md | 13 ++++++------- run-vmtest/check-kernel-splats.sh | 8 ++++++-- run-vmtest/run-bpf-selftests.sh | 6 +----- .../cases/unconfigured/dmesg.txt | 2 ++ .../check_kernel_splats/cases/unconfigured/env | 2 ++ .../cases/unconfigured/expected-output.txt | 1 + .../cases/unconfigured/expected-status.txt | 0 run-vmtest/tests/check_kernel_splats/run-test.sh | 1 + 8 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 run-vmtest/tests/check_kernel_splats/cases/unconfigured/dmesg.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/unconfigured/env create mode 100644 run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-output.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-status.txt diff --git a/run-vmtest/README.md b/run-vmtest/README.md index 1bebe636..24d5ac6d 100644 --- a/run-vmtest/README.md +++ b/run-vmtest/README.md @@ -47,24 +47,23 @@ hung tasks and lockups. A hit adds a `kernel_splats` row to `exitstatus`, which turns the run red like any other failing test group. Anything fatal panics the VM instead, and fails the job on its own. -The check runs for the default suite or when the requested runners include -`test_progs`. Veristat-only runs skip it. +Leave both splat list files absent to disable detection. The action carries no patterns. What a splat is, and what is benign, is policy that changes per arch and per kernel, so it lives with the configs. Two files of extended regexes, one per line, `#` comments and blank lines ignored, named by `run-vmtest.env` next to the allow and denylists: -* `SPLAT_DENYLIST_FILE` - a matching dmesg line is a splat. **Required.** +* `SPLAT_DENYLIST_FILE` - a matching dmesg line is a splat. * `SPLAT_ALLOWLIST_FILE` - a matching splat line is ignored. Optional. -The denylist is required on purpose: with no patterns there is no check, so a -missing or empty file fails the run rather than reporting a clean log. +If either file exists, the denylist must exist and contain at least one +pattern. See `ci/vmtest/configs/SPLAT_DENYLIST` for the set BPF CI uses. -`dmesg.txt` is written to the output dir and uploaded as the `kernel-log-*` -artifact, so the full log is always one click away. +When the detector runs, `dmesg.txt` is written to the output dir and uploaded +as the `kernel-log-*` artifact, so the full log is one click away. ## run-vmtest.env diff --git a/run-vmtest/check-kernel-splats.sh b/run-vmtest/check-kernel-splats.sh index 28ee5284..1c754732 100755 --- a/run-vmtest/check-kernel-splats.sh +++ b/run-vmtest/check-kernel-splats.sh @@ -7,8 +7,7 @@ # config repo rather than here: # # SPLAT_DENYLIST_FILE extended regexes; a matching dmesg line is a splat. -# Required: with no patterns there is no check, so a -# missing file fails the run instead of passing it. +# Required if either splat list file exists. # SPLAT_ALLOWLIST_FILE extended regexes; a matching splat line is ignored. # Optional: no file means no exceptions. # @@ -28,6 +27,11 @@ OUTPUT_DIR=${OUTPUT_DIR:-/mnt/vmtest} SPLAT_DENYLIST_FILE=${SPLAT_DENYLIST_FILE:-} SPLAT_ALLOWLIST_FILE=${SPLAT_ALLOWLIST_FILE:-} +if [ ! -e "${SPLAT_DENYLIST_FILE}" ] && [ ! -e "${SPLAT_ALLOWLIST_FILE}" ]; then + echo "Skipping kernel splat check: no allowlist or denylist files found" + exit 0 +fi + # Fail the row and stop. Also used when the scan cannot run: a check that is # not working must not look like a clean log. fail_check() { diff --git a/run-vmtest/run-bpf-selftests.sh b/run-vmtest/run-bpf-selftests.sh index da4af1f8..c598354e 100755 --- a/run-vmtest/run-bpf-selftests.sh +++ b/run-vmtest/run-bpf-selftests.sh @@ -178,8 +178,4 @@ else done fi -if [ ${#TEST_NAMES[@]} -eq 0 ] || [[ "${TEST_NAMES[*]}" == *test_progs* ]]; then - "${SCRIPT_DIR}/check-kernel-splats.sh" -else - echo "Skipping kernel splat check: test_progs not requested" -fi +"${SCRIPT_DIR}/check-kernel-splats.sh" diff --git a/run-vmtest/tests/check_kernel_splats/cases/unconfigured/dmesg.txt b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/dmesg.txt new file mode 100644 index 00000000..56a30cbb --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/dmesg.txt @@ -0,0 +1,2 @@ +[ 0.000000] Linux version 6.5.0 +[ 12.345679] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 do_thing+0x10/0x20 diff --git a/run-vmtest/tests/check_kernel_splats/cases/unconfigured/env b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/env new file mode 100644 index 00000000..3dfcc6d6 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/env @@ -0,0 +1,2 @@ +export SPLAT_DENYLIST_FILE="${CASE_DIR}/missing-denylist.txt" +export SPLAT_ALLOWLIST_FILE="${CASE_DIR}/missing-allowlist.txt" diff --git a/run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-output.txt b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-output.txt new file mode 100644 index 00000000..8163cc74 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-output.txt @@ -0,0 +1 @@ +Skipping kernel splat check: no allowlist or denylist files found diff --git a/run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-status.txt b/run-vmtest/tests/check_kernel_splats/cases/unconfigured/expected-status.txt new file mode 100644 index 00000000..e69de29b diff --git a/run-vmtest/tests/check_kernel_splats/run-test.sh b/run-vmtest/tests/check_kernel_splats/run-test.sh index f3a5f798..c46b714d 100755 --- a/run-vmtest/tests/check_kernel_splats/run-test.sh +++ b/run-vmtest/tests/check_kernel_splats/run-test.sh @@ -11,6 +11,7 @@ run_case() ( CASE_DIR=$(realpath "${case_dir}") export CASE_DIR OUTPUT_DIR="$tmpdir" STATUS_FILE="$tmpdir/exitstatus" + : > "${STATUS_FILE}" # Default to the configs this repo carries, which is what a job gets from # $VMTEST_CONFIGS. A case overrides either one through its `env` file. From 032d6fc2bc223b469674a3afd139dbee4b5f6593 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Mon, 17 Aug 2026 13:25:44 -0700 Subject: [PATCH 2/3] run-vmtest: surface kernel splat details in job log The detector runs inside the outer vmtest log group, so its matched context remains collapsed even though it emits a GitHub error. Write a short diagnostic excerpt next to exitstatus and print it from the host after the vmtest group closes. Use its first line for the error annotation so the failure is visible immediately, while retaining dmesg.txt as the full-log artifact. Build the excerpt from the already allowlist-filtered hits. The previous second grep used the raw denylist again, reintroducing allowed matches and potentially printing thousands of unrelated lines. Add coverage for saved excerpts and a log containing both allowed and unallowed splats. Assisted-by: Codex:GPT-5 Signed-off-by: Ihor Solodrai --- run-vmtest/README.md | 5 +++-- run-vmtest/check-kernel-splats.sh | 15 ++++++++++++--- run-vmtest/run.sh | 11 +++++++++++ .../cases/kasan/expected-output.txt | 14 -------------- .../cases/kasan/expected-splat-log.txt | 14 ++++++++++++++ .../cases/mixed_allowlist/allowlist.txt | 1 + .../cases/mixed_allowlist/dmesg.txt | 5 +++++ .../check_kernel_splats/cases/mixed_allowlist/env | 1 + .../cases/mixed_allowlist/expected-output.txt | 4 ++++ .../cases/mixed_allowlist/expected-splat-log.txt | 6 ++++++ .../cases/mixed_allowlist/expected-status.txt | 1 + .../cases/multi/expected-output.txt | 15 --------------- .../cases/multi/expected-splat-log.txt | 15 +++++++++++++++ .../cases/no_denylist/expected-splat-log.txt | 1 + .../cases/warn/expected-output.txt | 15 --------------- .../cases/warn/expected-splat-log.txt | 15 +++++++++++++++ run-vmtest/tests/check_kernel_splats/run-test.sh | 7 +++++++ 17 files changed, 96 insertions(+), 49 deletions(-) create mode 100644 run-vmtest/tests/check_kernel_splats/cases/kasan/expected-splat-log.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/allowlist.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/dmesg.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/env create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-output.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-splat-log.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-status.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/multi/expected-splat-log.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/no_denylist/expected-splat-log.txt create mode 100644 run-vmtest/tests/check_kernel_splats/cases/warn/expected-splat-log.txt diff --git a/run-vmtest/README.md b/run-vmtest/README.md index 24d5ac6d..2617526d 100644 --- a/run-vmtest/README.md +++ b/run-vmtest/README.md @@ -62,8 +62,9 @@ pattern. See `ci/vmtest/configs/SPLAT_DENYLIST` for the set BPF CI uses. -When the detector runs, `dmesg.txt` is written to the output dir and uploaded -as the `kernel-log-*` artifact, so the full log is one click away. +On failure, matching kernel log context is printed in the job log. `dmesg.txt` +is also written to the output dir and uploaded as the `kernel-log-*` artifact +for the full log. ## run-vmtest.env diff --git a/run-vmtest/check-kernel-splats.sh b/run-vmtest/check-kernel-splats.sh index 1c754732..e7db4f1e 100755 --- a/run-vmtest/check-kernel-splats.sh +++ b/run-vmtest/check-kernel-splats.sh @@ -14,7 +14,9 @@ # `#` comments and blank lines are ignored in both. See run-vmtest.env in the # repo that owns $VMTEST_CONFIGS. # -# The whole log is written to dmesg.txt, which the workflow uploads. +# The whole log is written to dmesg.txt, which the workflow uploads. A short +# excerpt around unallowlisted hits is written next to the status file so the +# host can print it after closing the folded VM log. # # $1 - log file to scan instead of running dmesg (used by the unit tests) @@ -26,6 +28,9 @@ STATUS_FILE=${STATUS_FILE:-/mnt/vmtest/exitstatus} OUTPUT_DIR=${OUTPUT_DIR:-/mnt/vmtest} SPLAT_DENYLIST_FILE=${SPLAT_DENYLIST_FILE:-} SPLAT_ALLOWLIST_FILE=${SPLAT_ALLOWLIST_FILE:-} +SPLAT_LOG_FILE=${SPLAT_LOG_FILE:-"$(dirname "${STATUS_FILE}")/kernel_splats.log"} + +rm -f "${SPLAT_LOG_FILE}" if [ ! -e "${SPLAT_DENYLIST_FILE}" ] && [ ! -e "${SPLAT_ALLOWLIST_FILE}" ]; then echo "Skipping kernel splat check: no allowlist or denylist files found" @@ -36,6 +41,7 @@ fi # not working must not look like a clean log. fail_check() { echo "$1" + printf '%s\n' "$1" > "${SPLAT_LOG_FILE}" echo "kernel_splats:1" >> "${STATUS_FILE}" foldable end kernel_splats exit 0 @@ -82,5 +88,8 @@ if [ -z "${hits}" ]; then fi echo "kernel_splats:1" >> "${STATUS_FILE}" -grep -nC 30 -E -f <(printf '%s\n' "${deny}") "${log}" || true -echo "::error title=kernel_splats::kernel splat detected, see the dmesg.txt artifact" +first_hit=${hits%%$'\n'*} +{ + printf 'kernel splat detected: %s\n' "${first_hit}" + grep -nC 30 -F -f <(printf '%s\n' "${hits}") "${log}" || true +} > "${SPLAT_LOG_FILE}" diff --git a/run-vmtest/run.sh b/run-vmtest/run.sh index 545590ee..425682d7 100755 --- a/run-vmtest/run.sh +++ b/run-vmtest/run.sh @@ -117,6 +117,17 @@ rm -f $VMTEST_TOML foldable end vmtest +if grep -q '^kernel_splats:1$' exitstatus; then + splat_error="kernel splat check failed" + if [[ -s kernel_splats.log ]]; then + cat kernel_splats.log + splat_error=$(head -n 1 kernel_splats.log) + fi + splat_error=${splat_error//'%'/'%25'} + splat_error=${splat_error//$'\r'/'%0D'} + printf '::error title=kernel_splats::%s\n' "${splat_error}" +fi + foldable start collect_status "Collecting exit status" exitfile="$(cat exitstatus 2>/dev/null)" diff --git a/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-output.txt b/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-output.txt index 0769d2f9..d1c64396 100644 --- a/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-output.txt +++ b/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-output.txt @@ -2,17 +2,3 @@ Splat denylist: $VMTEST_CONFIGS/SPLAT_DENYLIST Splat allowlist: $VMTEST_CONFIGS/SPLAT_ALLOWLIST ::endgroup:: -1-[ 0.000000] Linux version 6.5.0 -2-[ 20.000000] ================================================================== -3:[ 20.000001] BUG: KASAN: slab-use-after-free in foo+0x42/0x100 -4-[ 20.000002] Read of size 8 at addr ffff888100001234 by task test_progs/123 -5-[ 20.000003] -6-[ 20.000004] CPU: 0 PID: 123 Comm: test_progs -7-[ 20.000005] Call Trace: -8-[ 20.000006] -9-[ 20.000007] dump_stack_lvl+0x60/0x80 -10-[ 20.000008] print_report+0xc4/0x630 -11-[ 20.000009] kasan_report+0xb6/0xf0 -12-[ 20.000010] -13-[ 20.000011] ================================================================== -::error title=kernel_splats::kernel splat detected, see the dmesg.txt artifact diff --git a/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-splat-log.txt b/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-splat-log.txt new file mode 100644 index 00000000..0fdae836 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/kasan/expected-splat-log.txt @@ -0,0 +1,14 @@ +kernel splat detected: [ 20.000001] BUG: KASAN: slab-use-after-free in foo+0x42/0x100 +1-[ 0.000000] Linux version 6.5.0 +2-[ 20.000000] ================================================================== +3:[ 20.000001] BUG: KASAN: slab-use-after-free in foo+0x42/0x100 +4-[ 20.000002] Read of size 8 at addr ffff888100001234 by task test_progs/123 +5-[ 20.000003] +6-[ 20.000004] CPU: 0 PID: 123 Comm: test_progs +7-[ 20.000005] Call Trace: +8-[ 20.000006] +9-[ 20.000007] dump_stack_lvl+0x60/0x80 +10-[ 20.000008] print_report+0xc4/0x630 +11-[ 20.000009] kasan_report+0xb6/0xf0 +12-[ 20.000010] +13-[ 20.000011] ================================================================== diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/allowlist.txt b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/allowlist.txt new file mode 100644 index 00000000..2d5c5f08 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/allowlist.txt @@ -0,0 +1 @@ +WARNING: CPU: 0 PID: 100 at kernel/sched/core\.c:1234 diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/dmesg.txt b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/dmesg.txt new file mode 100644 index 00000000..cb193723 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/dmesg.txt @@ -0,0 +1,5 @@ +[ 0.000000] Linux version 6.5.0 +[ 10.000000] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 allowed+0x1/0x2 +[ 10.000001] Call Trace: +[ 11.000000] BUG: KASAN: slab-out-of-bounds in real_splat+0x3/0x4 +[ 11.000001] Read of size 8 at addr ffff888000000000 by task test_progs/9 diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/env b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/env new file mode 100644 index 00000000..1a6185b1 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/env @@ -0,0 +1 @@ +export SPLAT_ALLOWLIST_FILE="${CASE_DIR}/allowlist.txt" diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-output.txt b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-output.txt new file mode 100644 index 00000000..c5e0ac90 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-output.txt @@ -0,0 +1,4 @@ +::group::kernel_splats - Checking kernel log for splats +Splat denylist: $VMTEST_CONFIGS/SPLAT_DENYLIST +Splat allowlist: $CASE_DIR/allowlist.txt +::endgroup:: diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-splat-log.txt b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-splat-log.txt new file mode 100644 index 00000000..18003211 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-splat-log.txt @@ -0,0 +1,6 @@ +kernel splat detected: [ 11.000000] BUG: KASAN: slab-out-of-bounds in real_splat+0x3/0x4 +1-[ 0.000000] Linux version 6.5.0 +2-[ 10.000000] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 allowed+0x1/0x2 +3-[ 10.000001] Call Trace: +4:[ 11.000000] BUG: KASAN: slab-out-of-bounds in real_splat+0x3/0x4 +5-[ 11.000001] Read of size 8 at addr ffff888000000000 by task test_progs/9 diff --git a/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-status.txt b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-status.txt new file mode 100644 index 00000000..e78f9fae --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/mixed_allowlist/expected-status.txt @@ -0,0 +1 @@ +kernel_splats:1 diff --git a/run-vmtest/tests/check_kernel_splats/cases/multi/expected-output.txt b/run-vmtest/tests/check_kernel_splats/cases/multi/expected-output.txt index cffc0bd9..d1c64396 100644 --- a/run-vmtest/tests/check_kernel_splats/cases/multi/expected-output.txt +++ b/run-vmtest/tests/check_kernel_splats/cases/multi/expected-output.txt @@ -2,18 +2,3 @@ Splat denylist: $VMTEST_CONFIGS/SPLAT_DENYLIST Splat allowlist: $VMTEST_CONFIGS/SPLAT_ALLOWLIST ::endgroup:: -1-[ 0.100000] Linux version 6.5.0 -2:[ 10.000000] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1 first+0x1/0x2 -3-[ 10.000001] Call Trace: -4-[ 10.000002] ? __warn+0x80/0xc0 -5-[ 10.000003] ---[ end trace ]--- -6-[ 10.500000] test_progs: PASS one -7-[ 11.000000] test_progs: running two -8:[ 11.000001] BUG: KASAN: slab-out-of-bounds in second+0x3/0x4 -9-[ 11.000002] Read of size 8 at addr ffff888000000000 by task test_progs/9 -10-[ 11.000003] ---[ end trace ]--- -11-[ 199.000000] test_progs: running three -12:[ 200.000000] watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [test_progs:9] -13:[ 200.000001] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [test_progs:9] -14-[ 201.000000] test_progs: PASS -::error title=kernel_splats::kernel splat detected, see the dmesg.txt artifact diff --git a/run-vmtest/tests/check_kernel_splats/cases/multi/expected-splat-log.txt b/run-vmtest/tests/check_kernel_splats/cases/multi/expected-splat-log.txt new file mode 100644 index 00000000..fdd6b26c --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/multi/expected-splat-log.txt @@ -0,0 +1,15 @@ +kernel splat detected: [ 10.000000] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1 first+0x1/0x2 +1-[ 0.100000] Linux version 6.5.0 +2:[ 10.000000] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1 first+0x1/0x2 +3-[ 10.000001] Call Trace: +4-[ 10.000002] ? __warn+0x80/0xc0 +5-[ 10.000003] ---[ end trace ]--- +6-[ 10.500000] test_progs: PASS one +7-[ 11.000000] test_progs: running two +8:[ 11.000001] BUG: KASAN: slab-out-of-bounds in second+0x3/0x4 +9-[ 11.000002] Read of size 8 at addr ffff888000000000 by task test_progs/9 +10-[ 11.000003] ---[ end trace ]--- +11-[ 199.000000] test_progs: running three +12:[ 200.000000] watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [test_progs:9] +13:[ 200.000001] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [test_progs:9] +14-[ 201.000000] test_progs: PASS diff --git a/run-vmtest/tests/check_kernel_splats/cases/no_denylist/expected-splat-log.txt b/run-vmtest/tests/check_kernel_splats/cases/no_denylist/expected-splat-log.txt new file mode 100644 index 00000000..dc7c4a45 --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/no_denylist/expected-splat-log.txt @@ -0,0 +1 @@ +No splat denylist: SPLAT_DENYLIST_FILE=/nonexistent/SPLAT_DENYLIST diff --git a/run-vmtest/tests/check_kernel_splats/cases/warn/expected-output.txt b/run-vmtest/tests/check_kernel_splats/cases/warn/expected-output.txt index 2b4221ed..d1c64396 100644 --- a/run-vmtest/tests/check_kernel_splats/cases/warn/expected-output.txt +++ b/run-vmtest/tests/check_kernel_splats/cases/warn/expected-output.txt @@ -2,18 +2,3 @@ Splat denylist: $VMTEST_CONFIGS/SPLAT_DENYLIST Splat allowlist: $VMTEST_CONFIGS/SPLAT_ALLOWLIST ::endgroup:: -1-[ 0.000000] Linux version 6.5.0 -2-[ 0.001234] CPU: 0 -3-[ 12.345678] ------------[ cut here ]------------ -4:[ 12.345679] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 do_thing+0x10/0x20 -5-[ 12.345680] Modules linked in: -6-[ 12.345681] CPU: 0 PID: 100 Comm: test_progs -7-[ 12.345682] RIP: 0010:do_thing+0x10/0x20 -8-[ 12.345683] Call Trace: -9-[ 12.345684] -10-[ 12.345685] ? __warn+0x80/0xc0 -11-[ 12.345686] ? report_bug+0xa0/0xc0 -12-[ 12.345687] -13-[ 12.345688] ---[ end trace ]--- -14-[ 13.000000] test_progs: PASS -::error title=kernel_splats::kernel splat detected, see the dmesg.txt artifact diff --git a/run-vmtest/tests/check_kernel_splats/cases/warn/expected-splat-log.txt b/run-vmtest/tests/check_kernel_splats/cases/warn/expected-splat-log.txt new file mode 100644 index 00000000..4d6d65be --- /dev/null +++ b/run-vmtest/tests/check_kernel_splats/cases/warn/expected-splat-log.txt @@ -0,0 +1,15 @@ +kernel splat detected: [ 12.345679] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 do_thing+0x10/0x20 +1-[ 0.000000] Linux version 6.5.0 +2-[ 0.001234] CPU: 0 +3-[ 12.345678] ------------[ cut here ]------------ +4:[ 12.345679] WARNING: CPU: 0 PID: 100 at kernel/sched/core.c:1234 do_thing+0x10/0x20 +5-[ 12.345680] Modules linked in: +6-[ 12.345681] CPU: 0 PID: 100 Comm: test_progs +7-[ 12.345682] RIP: 0010:do_thing+0x10/0x20 +8-[ 12.345683] Call Trace: +9-[ 12.345684] +10-[ 12.345685] ? __warn+0x80/0xc0 +11-[ 12.345686] ? report_bug+0xa0/0xc0 +12-[ 12.345687] +13-[ 12.345688] ---[ end trace ]--- +14-[ 13.000000] test_progs: PASS diff --git a/run-vmtest/tests/check_kernel_splats/run-test.sh b/run-vmtest/tests/check_kernel_splats/run-test.sh index c46b714d..41431989 100755 --- a/run-vmtest/tests/check_kernel_splats/run-test.sh +++ b/run-vmtest/tests/check_kernel_splats/run-test.sh @@ -31,6 +31,13 @@ run_case() ( diff -u "${case_dir}/expected-output.txt" "$tmpdir/output.txt" diff -u "${case_dir}/expected-status.txt" "$tmpdir/exitstatus" + + if [ -f "${case_dir}/expected-splat-log.txt" ]; then + diff -u "${case_dir}/expected-splat-log.txt" "$tmpdir/kernel_splats.log" + elif [ -e "$tmpdir/kernel_splats.log" ]; then + echo "Unexpected kernel_splats.log for ${case_dir}" + return 1 + fi ) for case_dir in cases/*/; do From 9ee4c94951d0c88d750713c95ba44f92a4945ce5 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Mon, 17 Aug 2026 13:30:22 -0700 Subject: [PATCH 3/3] run-vmtest: reduce shell trace noise Global xtrace in the run-vmtest entry points logs every variable assignment and helper invocation. Recent test jobs gained 317 to 340 trace lines each, amounting to roughly 8,000 lines across a full workflow. The scripts already print the useful commands, selected list files, and final results. Drop global xtrace from run.sh, prepare-bpf-selftests.sh, and run-bpf-selftests.sh while retaining errexit, nounset, and pipefail. The focused xtrace around veristat commands remains. Assisted-by: Codex:GPT-5 Signed-off-by: Ihor Solodrai --- run-vmtest/prepare-bpf-selftests.sh | 2 +- run-vmtest/run-bpf-selftests.sh | 2 +- run-vmtest/run.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run-vmtest/prepare-bpf-selftests.sh b/run-vmtest/prepare-bpf-selftests.sh index 4470223d..fb9b8466 100755 --- a/run-vmtest/prepare-bpf-selftests.sh +++ b/run-vmtest/prepare-bpf-selftests.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -xeuo pipefail +set -euo pipefail if [[ -z "${SELFTESTS_BPF_ALLOWLIST_FILES:-}" && -z "${SELFTESTS_BPF_DENYLIST_FILES:-}" ]]; then exit 0 diff --git a/run-vmtest/run-bpf-selftests.sh b/run-vmtest/run-bpf-selftests.sh index c598354e..151e62c6 100755 --- a/run-vmtest/run-bpf-selftests.sh +++ b/run-vmtest/run-bpf-selftests.sh @@ -12,7 +12,7 @@ # Runners passed as arguments are executed. In case of no arguments, # all test runners are executed. -set -xeuo pipefail +set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" source "${SCRIPT_DIR}/helpers.sh" diff --git a/run-vmtest/run.sh b/run-vmtest/run.sh index 425682d7..3fc30b8e 100755 --- a/run-vmtest/run.sh +++ b/run-vmtest/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -xeuo pipefail +set -euo pipefail trap 'exit 2' ERR source "${GITHUB_ACTION_PATH}/../helpers.sh"