linux/include/kunit
Ujwal Jain 63d0a91231 kunit: Adjust kunit_test timeout based on test_{suite,case} speed
Currently, the in-kernel kunit test case timeout is 300 seconds. (There
is a separate timeout mechanism for the whole test execution in
kunit.py, but that's unrelated.) However, tests marked 'slow' or 'very
slow' may timeout, particularly on slower machines.

Implement a multiplier to the test-case timeout, so that slower tests
have longer to complete:
- DEFAULT -> 1x default timeout
- KUNIT_SPEED_SLOW -> 3x default timeout
- KUNIT_SPEED_VERY_SLOW -> 12x default timeout

A further change is planned to allow user configuration of the
default/base timeout to allow people with faster or slower machines to
adjust these to their use-cases.

Link: https://lore.kernel.org/r/20250614084711.2654593-2-davidgow@google.com
Signed-off-by: Ujwal Jain <ujwaljain@google.com>
Co-developed-by: David Gow <davidgow@google.com>
Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-06-24 20:47:39 -06:00
..
assert.h kunit: Rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT for readability 2024-07-12 10:12:05 -06:00
attributes.h kunit: Add ability to filter attributes 2023-07-26 13:29:15 -06:00
clk.h clk: test: Forward-declare struct of_phandle_args in kunit/clk.h 2025-05-06 14:50:01 -07:00
device.h kunit: Add APIs for managing devices 2023-12-18 13:28:08 -07:00
of.h of: kunit: Extract some overlay boiler plate into macros 2024-10-09 16:25:32 -07:00
platform_device.h kunit: platform: Resolve 'struct completion' warning 2025-01-11 16:00:36 -07:00
resource.h kunit: Add a macro to wrap a deferred action function 2023-12-18 13:21:14 -07:00
skbuff.h kunit: skb: add gfp to kernel doc for kunit_zalloc_skb() 2024-11-19 14:52:17 -07:00
static_stub.h kunit: Allow passing function pointer to kunit_activate_static_stub() 2024-01-03 09:06:52 -07:00
test-bug.h kunit: test-bug.h: include stddef.h for NULL 2023-07-18 15:38:13 -06:00
test.h kunit: Spelling s/slowm/slow/ 2025-04-08 14:57:24 -06:00
try-catch.h kunit: Adjust kunit_test timeout based on test_{suite,case} speed 2025-06-24 20:47:39 -06:00
visibility.h module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00