All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] selftests/bpf: Fix prog_tests framework self-tests
@ 2026-10-12 14:01 KaFai Wan
  2026-10-12 14:01 ` [PATCH bpf-next 1/3] selftests/bpf: Fix prog_tests framework subtest count checks KaFai Wan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: KaFai Wan @ 2026-10-12 14:01 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Ihor Solodrai,
	Alexei Starovoitov, Daniel Borkmann, Kumar Kartikeya Dwivedi,
	Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
	Emil Tsalapatis, Shuah Khan, KaFai Wan, Mykola Lysenko, bpf,
	linux-kselftest, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-12 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 14:01 [PATCH bpf-next 0/3] selftests/bpf: Fix prog_tests framework self-tests KaFai Wan
2026-10-12 14:01 ` [PATCH bpf-next 1/3] selftests/bpf: Fix prog_tests framework subtest count checks KaFai Wan
2026-10-12 14:02 ` [PATCH bpf-next 2/3] selftests/bpf: Skip expected_msgs subtests when stdout is not saved KaFai Wan
2026-10-12 14:02 ` [PATCH bpf-next 3/3] selftests/bpf: Skip compare_text subtest " KaFai Wan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.