kunit: add KUNIT_INIT_TABLE to init linker section
authorRae Moar <rmoar@google.com>
Wed, 13 Dec 2023 19:44:17 +0000 (19:44 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 18 Dec 2023 20:21:15 +0000 (13:21 -0700)
commitd81f0d7b8b23ec79f80be602ed6129ded27862e8
tree2ad32958ea62db0dd0f2b2324be9c8596f9a73cd
parent69dfdce1c5161a37a14720e5f6f62a36e387aa33
kunit: add KUNIT_INIT_TABLE to init linker section

Add KUNIT_INIT_TABLE to the INIT_DATA linker section.

Alter the KUnit macros to create init tests:
kunit_test_init_section_suites

Update lib/kunit/executor.c to run both the suites in KUNIT_TABLE and
KUNIT_INIT_TABLE.

Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
include/asm-generic/vmlinux.lds.h
include/kunit/test.h
include/linux/module.h
kernel/module/main.c
lib/kunit/executor.c
lib/kunit/test.c