linux/lib/kunit
Arnd Bergmann b11b9b6751 kunit: reduce stack usage in kunit_run_tests()
Some of the recent changes to the kunit framework caused the stack usage
for kunit_run_tests() to grow higher than most other kernel functions,
which triggers a warning when CONFIG_FRAME_WARN is set to a relatively
low value:

lib/kunit/test.c: In function 'kunit_run_tests':
lib/kunit/test.c:801:1: error: the frame size of 1312 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]

Split out the inner loop into a separate function to ensure that each
function remains under the limit, and pass the kunit_result_stats
structures by reference to avoid excessive copies.

Fixed checkpatch warnings at commit time:
Shuah Khan <skhan@linuxfoundation.org>

Cc: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2026-03-02 10:11:06 -07:00
..
.kunitconfig
Kconfig kunit: make FAULT_TEST default to n when PANIC_ON_OOPS 2025-12-15 09:27:19 -07:00
Makefile kunit: Always descend into kunit directory during build 2025-08-15 11:39:46 -06:00
assert.c kunit: fix up const mis-match in many assert functions 2026-01-05 15:32:03 -07:00
assert_test.c
attributes.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
debugfs.c
debugfs.h
device-impl.h
device.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
executor.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
executor_test.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hooks-impl.h
hooks.c
kunit-example-test.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kunit-test.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
platform-test.c
platform.c
resource.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
static_stub.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
string-stream-test.c
string-stream.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
string-stream.h
test.c kunit: reduce stack usage in kunit_run_tests() 2026-03-02 10:11:06 -07:00
try-catch-impl.h kunit: Adjust kunit_test timeout based on test_{suite,case} speed 2025-06-24 20:47:39 -06:00
try-catch.c kunit: Adjust kunit_test timeout based on test_{suite,case} speed 2025-06-24 20:47:39 -06:00
user_alloc.c kunit: test: Export kunit_attach_mm() 2025-07-16 14:11:58 +02:00