[PATCH bpf-next 0/3] selftests/bpf: Fix prog_tests framework self-tests
From: KaFai Wan
Date: Mon Oct 12 2026 - 10:27:45 EST
Three prog_tests framework self-tests fail depending on how test_progs
is invoked:
- ./test_progs -t prog_tests_framework/test_fail -v
test_prog_tests_framework:FAIL:skip_cnt_check
unexpected skip_cnt_check: actual 0 != expected 2
- ./test_progs -t prog_tests_framework_expected_msgs -v
Caught signal #11!
Stack trace:
./test_progs(crash_handler+0x38)[0x55620006fbb0]
- ./test_progs -t prog_tests_framework_compare_text -v
test_prog_tests_framework_compare_text:PASS:mismatch_rc 0 nsec
Caught signal #11!
Stack trace:
./test_progs(crash_handler+0x38)[0x564ddbfcfbb0]
Patch #1 counts the subtests that actually ran, so the skip and error
count checks no longer fail when -t or -n filters out some subtests.
Patches #2 and #3 skip the subtests that inspect the log buffer when the
output is not captured, such as with -v in non-parallel mode, instead of
crashing on a NULL log_buf.
---
KaFai Wan (3):
selftests/bpf: Fix prog_tests framework subtest count checks
selftests/bpf: Skip expected_msgs subtests when stdout is not saved
selftests/bpf: Skip compare_text subtest when stdout is not saved
.../bpf/prog_tests/prog_tests_framework.c | 34 ++++++++++++++-----
1 file changed, 25 insertions(+), 9 deletions(-)
--
2.43.0