mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] selftests: add option to print the time spent per test
@ 2026-11-20 11:25 Jori Koolstra (CIQ)
  2026-11-20 11:25 ` [PATCH v2 1/2] selftests: pass the timeout override to tests run in a netns Jori Koolstra (CIQ)
  2026-11-20 11:25 ` [PATCH v2 2/2] selftests: add option to print the time spent per test Jori Koolstra (CIQ)
  0 siblings, 2 replies; 4+ messages in thread
From: Jori Koolstra (CIQ) @ 2026-11-20 11:25 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 patch of runner.sh fixes a bug when using --netns in
run_kselftest.sh.

Signed-off-by: Jori Koolstra (CIQ) <jkoolstra@xs4all.nl>
---
Changes in v2:
- Dropped convention change from the series (as Shuah requested)
- Link to v1: https://lore.kernel.org/r/20261118-kselftest-run-timer-v1-0-53a838b2d62b@xs4all.nl

---
Jori Koolstra (CIQ) (2):
      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 | 21 +++++++++++++++++++++
 tools/testing/selftests/run_kselftest.sh    |  8 ++++++++
 2 files changed, 29 insertions(+)
---
base-commit: 65e4fd942f72a9dba0e4e257290c4fa1aa756854
change-id: 20261117-kselftest-run-timer-df3ac531652e

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


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

end of thread, other threads:[~2026-11-23  6:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20 11:25 [PATCH v2 0/2] selftests: add option to print the time spent per test Jori Koolstra (CIQ)
2026-11-20 11:25 ` [PATCH v2 1/2] selftests: pass the timeout override to tests run in a netns Jori Koolstra (CIQ)
2026-11-23  6:25   ` Hangbin Liu
2026-11-20 11:25 ` [PATCH v2 2/2] selftests: add option to print the time spent per test Jori Koolstra (CIQ)

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®