Skip to content

Commit 41a5556

Browse files
sulixshuahkh
authored andcommitted
module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m
The new KUnit module handling has KUnit test suites listed in a .kunit_test_suites section of each module. This should be loaded when the module is, but at the moment this only happens if KUnit is built-in. Also load this when KUnit is enabled as a module: it'll not be usable unless KUnit is loaded, but such modules are likely to depend on KUnit anyway, so it's unlikely to ever be loaded needlessly. Fixes: 3d6e446 ("kunit: unify module and builtin suite definitions") Signed-off-by: David Gow <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent d52788b commit 41a5556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/module/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ static int find_module_sections(struct module *mod, struct load_info *info)
20992099
sizeof(*mod->static_call_sites),
21002100
&mod->num_static_call_sites);
21012101
#endif
2102-
#ifdef CONFIG_KUNIT
2102+
#if IS_ENABLED(CONFIG_KUNIT)
21032103
mod->kunit_suites = section_objs(info, ".kunit_test_suites",
21042104
sizeof(*mod->kunit_suites),
21052105
&mod->num_kunit_suites);

0 commit comments

Comments
 (0)