]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Skip tests whose objects were not built
authorRicardo B. Marlière <rbm@suse.com>
Tue, 2 Jun 2026 13:02:56 +0000 (10:02 -0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Jun 2026 21:20:58 +0000 (14:20 -0700)
commitaeb73a9f301de4f0df7c858ea465a7a9f5d09fd7
tree73f69eae633cc83849f5b5c273e498f829dbb783
parent9c4de137a9a5280c95515e83e97838826603ea93
selftests/bpf: Skip tests whose objects were not built

When both run_test and run_serial_test are NULL (because the corresponding
.test.o was not compiled), mark the test as not built instead of fatally
aborting.

Report these tests as "SKIP (not built)" in per-test output and include
them in the skip count so they remain visible in CI results and JSON
output. The summary line shows the not-built count when nonzero:

  Summary: 50/55 PASSED, 5 SKIPPED (3 not built), 0 FAILED

Tests filtered out by -t/-n remain invisible as before; only genuinely
unbuilt tests are surfaced.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://lore.kernel.org/r/20260602-selftests-bpf_misconfig-v12-7-27f898b3ba26@suse.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_progs.h