1 // SPDX-License-Identifier: GPL-2.0+
3 #include <kunit/test.h>
4 #include <linux/module.h>
6 #include "test_modules.h"
9 * Test that modules with many relocations are loaded properly.
11 static void test_modules_many_vmlinux_relocs(struct kunit *test)
15 #define CALL_RETURN(i) result += test_modules_return_ ## i()
16 REPEAT_10000(CALL_RETURN);
17 KUNIT_ASSERT_EQ(test, result, 49995000);
20 static struct kunit_case modules_testcases[] = {
21 KUNIT_CASE(test_modules_many_vmlinux_relocs),
25 static struct kunit_suite modules_test_suite = {
26 .name = "modules_test_s390",
27 .test_cases = modules_testcases,
30 kunit_test_suites(&modules_test_suite);
32 MODULE_LICENSE("GPL");