kunit: Warn if tests are slow
authorMaxime Ripard <mripard@kernel.org>
Thu, 26 Oct 2023 08:59:31 +0000 (10:59 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 14 Nov 2023 20:01:37 +0000 (13:01 -0700)
commitf8f2847f739dc899d0e563eac01299dadefa64ff
tree9f84b2daf0a837f2914d7b6845773cbf1d73bce7
parentb85ea95d086471afb4ad062012a4d73cd328fa86
kunit: Warn if tests are slow

Kunit recently gained support to setup attributes, the first one being
the speed of a given test, then allowing to filter out slow tests.

A slow test is defined in the documentation as taking more than one
second. There's an another speed attribute called "super slow" but whose
definition is less clear.

Add support to the test runner to check the test execution time, and
report tests that should be marked as slow but aren't.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/test.c