summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorVineet Gupta <vineet.gupta@linux.dev>2026-08-07 13:44:33 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2026-08-12 20:25:31 +0200
commit7bd1dd3fb87d83b9141617bc817501762dd133eb (patch)
tree2da0519e48bfebd1d1b0c58538a0977647e0f236 /tools/perf/scripts/python
parent2614285f32627ce263d92ce1c07f33fc88ffb3b6 (diff)
selftests/bpf: Report failed subtest count in test_progs summary
The final summary line is asymmetric: the PASSED field reports both the number of top-level tests and the number of subtests within them, while the FAILED field reports only top-level tests: Summary: 640/5750 PASSED, 7760 SKIPPED, 100 FAILED There is no way to tell whether those 100 failing tests amount to 100 broken subtests or 1000. So count subtests with a non-zero error_cnt into a new sub_fail_cnt and print it alongside fail_cnt: Summary: 640/5750 PASSED, 7760 SKIPPED, 100/342 FAILED ^^^^^ This is correct for -j runs, as subtest_states[] is populated both in sequential and parallel modes. A test that fails without declaring any subtests contributes 0 to sub_fail_cnt. That mirrors the existing behaviour of sub_succ_cnt for tests that pass without subtests, keeping the two numerators comparable. Also emit the new count as a "failed_subtest" field in the JSON output, for parity with the existing "success_subtest". Note that this changes the trailing field of the summary line from a bare integer to "A/B", so anything scraping "N FAILED" out of it needs updating. While here, fix the fail_cnt comment in struct test_env, which claims it counts "total failed tests + sub-tests". Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20260807204434.1036279-4-vineet.gupta@linux.dev
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions