aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/test_modules_helpers.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2022-01-19 19:26:38 +0100
committerHeiko Carstens <hca@linux.ibm.com>2022-01-24 09:10:59 +0100
commit90c5318795eefa09a9f9aef8d18a904e24962b5c (patch)
treedf73e682286554977a42bc0b03eb88ff1a716357 /arch/s390/lib/test_modules_helpers.c
parents390/module: fix loading modules with a lot of relocations (diff)
downloadlinux-dev-90c5318795eefa09a9f9aef8d18a904e24962b5c.tar.xz
linux-dev-90c5318795eefa09a9f9aef8d18a904e24962b5c.zip
s390/module: test loading modules with a lot of relocations
Add a test in order to prevent regressions. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/lib/test_modules_helpers.c')
-rw-r--r--arch/s390/lib/test_modules_helpers.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/lib/test_modules_helpers.c b/arch/s390/lib/test_modules_helpers.c
new file mode 100644
index 000000000000..1670349a03eb
--- /dev/null
+++ b/arch/s390/lib/test_modules_helpers.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <linux/export.h>
+
+#include "test_modules.h"
+
+#define DEFINE_RETURN(i) \
+ int test_modules_return_ ## i(void) \
+ { \
+ return 1 ## i - 10000; \
+ } \
+ EXPORT_SYMBOL_GPL(test_modules_return_ ## i)
+REPEAT_10000(DEFINE_RETURN);