From: Matthieu Baerts <matttbe@kernel.org>
To: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/lib.mk: run_tests= print summary at the end
Date: Wed, 19 Aug 2026 13:20:07 +0200 [thread overview]
Message-ID: <0d8d10b6-0525-434c-b358-68df65937ce5@kernel.org> (raw)
In-Reply-To: <20260625-sft-run-tests-print-totals-v1-1-bfe588266249@kernel.org>
Hi Shuah,
On 25/06/2026 18:22, Matthieu Baerts (NGI0) wrote:
> When there are many tests and/or many log lines, it is difficult to
> quickly find out how the different tests went when running:
>
> make -C tools/testing/selftests run_tests
>
> This run_tests target executes 'run_many' from runner.sh, which relies
> on ktap_helpers.sh. At the end of the execution, the KTAP_CNT_* counters
> have been populated, and the total can then be simply printed with the
> ktap_print_totals helper.
>
> Now a summary is printed at the end, e.g. here with the two last lines:
>
> $ make -sC tools/testing/selftests TARGETS=(...) run_tests
> # timeout set to (...)
> # selftests: (...)
> (...)
> ok 1 selftests: (...)
> # timeout set to (...)
> # selftests: (...)
> (...)
> ok 2 selftests: (...) # SKIP
> # timeout set to (...)
> # selftests: (...)
> (...)
> not ok 3 selftests: (...)
> # 1 skipped test(s) detected. Consider enabling relevant config options to improve coverage.
> # Totals: pass:1 fail:1 xfail:0 xpass:0 skip:1 error:0
>
> This summary is printed, using '#' as prefix to be treated as a comment
> in the TAP format. The summary is also printed when summary=1 is used to
> redirect log lines in different files because it still looks useful when
> there are many tests, not to have to check each line.
>
> Note that this 'make' command will continue to exit without errors
> (returned code is 0) when the tests can be executed. I guess it is
> better not to change this behaviour to be able to continue detecting
> kselftests failures.
Gentle ping about this small addition? :)
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-08-19 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 16:22 Matthieu Baerts (NGI0)
2026-08-19 11:20 ` Matthieu Baerts [this message]
2026-09-07 2:51 ` Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d8d10b6-0525-434c-b358-68df65937ce5@kernel.org \
--to=matttbe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®