Skip to content

Commit 5afb366

Browse files
committed
run-vmtest: re-run denylisted tests for test_progs-bpf_gcc
The GCC BPF denylist is large and static, so tests stay on it long after the compiler has learnt to build them. Nothing in CI notices, because denylisted tests are never run. After the main test_progs-bpf_gcc pass, run a second pass over the tests the denylist excluded, by passing DENYLIST.test_progs-bpf_gcc back in as an allowlist. Tests reported as passing there are candidates for removal from the denylist. Only the runner specific list is re-run, not the merged denylist the main pass uses. Entries in the generic lists are excluded because they are broken or unstable in the VM rather than because of the compiler, so re-running them would risk taking the VM down without saying anything about GCC. The list is consumed as-is: test_progs parses list files itself, skipping blank lines and '#' comments, so it does not need to be normalized first. The second pass is informational. Its exit code is deliberately not appended to the exit status file, so tests that are still failing, which is the expected outcome for most of them, cannot fail the job. No JSON summary is written either: run.sh feeds every test_*.json to print_test_summary.py, which truncates the step summary for each one, so a second file there would hide the results of the main pass. Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
1 parent 18749f6 commit 5afb366

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

run-vmtest/run-bpf-selftests.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export BPFTOOL=$(find $(realpath "$SELFTESTS_BPF/tools/sbin") -type f -name bpft
2424

2525
STATUS_FILE=${STATUS_FILE:-/mnt/vmtest/exitstatus}
2626
OUTPUT_DIR=${OUTPUT_DIR:-/mnt/vmtest}
27+
VMTEST_CONFIGS_DIR=${VMTEST_CONFIGS_DIR:-/mnt/vmtest/ci/vmtest/configs}
2728

2829
test_progs_helper() {
2930
local selftest="test_progs${1}"
@@ -90,8 +91,41 @@ test_verifier() {
9091
foldable end test_verifier
9192
}
9293

94+
# Re-run the tests that the denylist kept out of the main pass, by feeding
95+
# the denylist back in as an allowlist. Denylisted tests are expected to
96+
# fail, so this reports the ones that have started passing and can be
97+
# dropped from the list.
98+
#
99+
# Only the runner specific list is re-run, not the merged denylist the main
100+
# pass uses: entries in the generic lists are excluded because they are
101+
# broken or unstable in the VM, so re-running them risks taking the whole
102+
# machine down, and they say nothing about the compiler either way.
103+
#
104+
# This is informational: the exit code is deliberately not written to
105+
# ${STATUS_FILE}, so tests that are still failing cannot fail the job.
106+
test_progs_denylisted_helper() {
107+
local selftest="test_progs${1}"
108+
local denylist="${VMTEST_CONFIGS_DIR}/DENYLIST.${selftest}"
109+
local args=()
110+
111+
if [ ! -s "${denylist}" ]; then
112+
echo "${denylist} is missing or empty, nothing to re-test"
113+
return 0
114+
fi
115+
116+
args+=(${TEST_PROGS_WATCHDOG_TIMEOUT:+-w$TEST_PROGS_WATCHDOG_TIMEOUT})
117+
args+=(-a@"${denylist}")
118+
119+
foldable start ${selftest}_denylisted "Re-testing denylisted ${selftest}"
120+
echo "./${selftest}" "${args[@]}"
121+
./${selftest} "${args[@]}" && true
122+
echo "${selftest} denylisted re-run exited with $?"
123+
foldable end ${selftest}_denylisted
124+
}
125+
93126
test_progs-bpf_gcc() {
94127
test_progs_helper "-bpf_gcc" ""
128+
test_progs_denylisted_helper "-bpf_gcc"
95129
}
96130

97131
export VERISTAT_TARGET=${VERISTAT_TARGET:-kernel}

0 commit comments

Comments
 (0)