]> git.baikalelectronics.ru Git - kernel.git/commit
module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m
authorDavid Gow <davidgow@google.com>
Wed, 13 Jul 2022 00:52:20 +0000 (08:52 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 15 Aug 2022 19:51:07 +0000 (13:51 -0600)
commit79cfbe979036b3a4225ababf794354e507993621
treef9bcf2398e14466aa0b007d0592f6c1db7ce39d5
parent0c3b87f88d1193cddd4c4df860e2ec22ba02b9e8
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: 29448213eb8c ("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>
kernel/module/main.c