Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 3d6e44623841 ("kunit: unify module and builtin suite definitions")
Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

David Gow and committed by
Shuah Khan
41a55567 d52788b3

+1 -1
+1 -1
kernel/module/main.c
··· 2099 2099 sizeof(*mod->static_call_sites), 2100 2100 &mod->num_static_call_sites); 2101 2101 #endif 2102 - #ifdef CONFIG_KUNIT 2102 + #if IS_ENABLED(CONFIG_KUNIT) 2103 2103 mod->kunit_suites = section_objs(info, ".kunit_test_suites", 2104 2104 sizeof(*mod->kunit_suites), 2105 2105 &mod->num_kunit_suites);