summaryrefslogtreecommitdiff
path: root/lib/kunit/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kunit/test.c')
-rw-r--r--lib/kunit/test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kunit/test.c b/lib/kunit/test.c
index cb9797fa6303..8b2808068497 100644
--- a/lib/kunit/test.c
+++ b/lib/kunit/test.c
@@ -736,7 +736,11 @@ EXPORT_SYMBOL_GPL(__kunit_test_suites_exit);
#ifdef CONFIG_MODULES
static void kunit_module_init(struct module *mod)
{
- __kunit_test_suites_init(mod->kunit_suites, mod->num_kunit_suites);
+ struct kunit_suite_set suite_set = {
+ mod->kunit_suites, mod->kunit_suites + mod->num_kunit_suites,
+ };
+
+ kunit_exec_run_tests(&suite_set, false);
}
static void kunit_module_exit(struct module *mod)