mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] selftests: add option to print the time spent per test
@ 2026-11-18 13:40 Jori Koolstra (CIQ)
  2026-11-18 13:40 ` [PATCH 1/3] selftests: use local variables consistently in runner.sh Jori Koolstra (CIQ)
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jori Koolstra (CIQ) @ 2026-11-18 13:40 UTC (permalink / raw)
  To: Shuah Khan, David Ahern, David S. Miller, Hangbin Liu,
	Ricardo B. Marlière
  Cc: linux-kselftest, linux-kernel, Jori Koolstra (CIQ)

For CI/CD purposes it is useful to know how much time each selftest
took to complete, for instance, to know which suites to run for a
quick-fail diagnostic, or what percentage of tests you can expect to
complete on a paricular --override-timeout value.

Add a -T/--timed option to run_kselftest.sh. When it is set, run_one()
prints a KTAP diagnostic line with the elapsed wall-clock time just
before the result line of each test that is actually run, e.g.:

      # selftests: timers: nanosleep
      # time: 12.34s
      ok 3 selftests: timers: nanosleep

The other two patches clean up the use of 'local' in runner.sh and fix a
bug when using --netns in run_kselftest.sh. Strictly these could be sent
as separate patches, but "selftests: add option to print the time spent
per test" builds on these, and it would otherwise require needless
rebasing for two small fixes.

Signed-off-by: Jori Koolstra (CIQ) <jkoolstra@xs4all.nl>
---
Jori Koolstra (CIQ) (3):
      selftests: use local variables consistently in runner.sh
      selftests: pass the timeout override to tests run in a netns
      selftests: add option to print the time spent per test

 tools/testing/selftests/kselftest/runner.sh | 50 ++++++++++++++++++++++-------
 tools/testing/selftests/run_kselftest.sh    |  8 +++++
 2 files changed, 47 insertions(+), 11 deletions(-)
---
base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
change-id: 20261117-kselftest-run-timer-df3ac531652e

Best regards,
-- 
Jori Koolstra (CIQ) <jkoolstra@xs4all.nl>


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

end of thread, other threads:[~2026-11-18 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 13:40 [PATCH 0/3] selftests: add option to print the time spent per test Jori Koolstra (CIQ)
2026-11-18 13:40 ` [PATCH 1/3] selftests: use local variables consistently in runner.sh Jori Koolstra (CIQ)
2026-11-18 16:13   ` Shuah Khan
2026-11-18 13:40 ` [PATCH 2/3] selftests: pass the timeout override to tests run in a netns Jori Koolstra (CIQ)
2026-11-18 13:40 ` [PATCH 3/3] selftests: add option to print the time spent per test Jori Koolstra (CIQ)
2026-11-18 16:15 ` [PATCH 0/3] " Shuah Khan

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®