aboutsummaryrefslogtreecommitdiff
path: root/tests/run-strip-reloc-ko.sh
blob: 55fa74dbe10dd8cc86c91123a8b3961d8251ee2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh

. $srcdir/strip-reloc-subr.sh

testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \
	hello_aarch64.ko hello_m68k.ko hello_riscv64.ko hello_csky.ko \
	hello_arc_hs4.ko

# Most simple hello world kernel module for various architectures.
# Make sure that it contains debuginfo with CONFIG_DEBUG_INFO=y.
# ::::::::::::::
# Makefile
# ::::::::::::::
# obj-m	:= hello.o
# hello-y := init.o exit.o
# 
# all:
# 	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) \
#		CONFIG_DEBUG_INFO=y modules
# ::::::::::::::
# init.c
# ::::::::::::::
# #include <linux/kernel.h>
# #include <linux/module.h>
# 
# int init_module(void)
# {
#   printk(KERN_INFO "Hello, world!\n");
#   return 0;
# }
# ::::::::::::::
# exit.c
# ::::::::::::::
# #include <linux/kernel.h>
# #include <linux/module.h>
# 
# void cleanup_module()
# {
#   printk(KERN_INFO "Goodbye, World!\n");
# }
runtest hello_i386.ko 1
runtest hello_x86_64.ko 1
runtest hello_ppc64.ko 1
runtest hello_s390.ko 1
runtest hello_aarch64.ko 1
runtest hello_m68k.ko 1
runtest hello_riscv64.ko 1
runtest hello_csky.ko 1
runtest hello_arc_hs4.ko 1

exit $runtest_status