summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/kselftests/kselftests_4.9.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/kselftests/kselftests_4.9.bb')
-rw-r--r--recipes-kernel/kselftests/kselftests_4.9.bb182
1 files changed, 182 insertions, 0 deletions
diff --git a/recipes-kernel/kselftests/kselftests_4.9.bb b/recipes-kernel/kselftests/kselftests_4.9.bb
new file mode 100644
index 00000000..3b1e43ee
--- /dev/null
+++ b/recipes-kernel/kselftests/kselftests_4.9.bb
@@ -0,0 +1,182 @@
1SUMMARY = "Linux Kernel Selftests"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
4
5SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz"
6
7SRC_URI[md5sum] = "0a68ef3615c64bd5ee54a3320e46667d"
8SRC_URI[sha256sum] = "029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a"
9
10S = "${WORKDIR}/linux-${PV}"
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14DEPENDS = "libcap popt rsync-native"
15
16inherit kernel-arch
17
18# Filter out arch specific tests
19TARGETS = " \
20 ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "breakpoints", "", d)} \
21 capabilities \
22 cpu-hotplug \
23 efivarfs \
24 exec \
25 firmware \
26 ftrace \
27 futex \
28 ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "ipc", "", d)} \
29 kcmp \
30 lib \
31 membarrier \
32 memfd \
33 memory-hotplug \
34 mount \
35 mqueue \
36 net \
37 nsfs \
38 ${@bb.utils.contains_any("TARGET_ARCH", [ "powerpc", "powerpc64" ], "powerpc", "", d)} \
39 pstore \
40 ptrace \
41 seccomp \
42 sigaltstack \
43 size \
44 static_keys \
45 sysctl \
46 timers \
47 user \
48 vm \
49 ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "x86", "", d)} \
50 zram \
51"
52
53EXTRA_OEMAKE += "-C tools/testing/selftests TARGETS="${TARGETS}" INSTALL_PATH=${D}${bindir}/kselftests CC="${CC}""
54
55# Their Makefiles are so sloppy, let's clean up a bit
56do_configure () {
57 sed "s|^CC := .*||g" -i ${S}/tools/testing/selftests/lib.mk
58 sed "s|^CC = .*||g" -i ${S}/tools/testing/selftests/timers/Makefile
59 sed "s|^CC = .*||g" -i ${S}/tools/testing/selftests/memfd/Makefile
60 sed "s|^CC := .*||g" -i ${S}/tools/testing/selftests/powerpc/switch_endian/Makefile
61 sed "s|gcc|\$(CC)|g" -i ${S}/tools/testing/selftests/breakpoints/Makefile
62 sed "s|^LDFLAGS += -lrt -lpthread|LDLIBS += -lrt -lpthread|g" -i ${S}/tools/testing/selftests/timers/Makefile
63}
64
65do_compile () {
66 oe_runmake
67}
68
69do_install () {
70 oe_runmake install
71 chown -R root:root ${D}
72}
73
74PACKAGE_BEFORE_PN = " \
75 ${PN}-breakpoints \
76 ${PN}-capabilities \
77 ${PN}-cpu-hotplug \
78 ${PN}-efivarfs \
79 ${PN}-exec \
80 ${PN}-firmware \
81 ${PN}-ftrace \
82 ${PN}-futex \
83 ${PN}-ipc \
84 ${PN}-kcmp \
85 ${PN}-lib \
86 ${PN}-membarrier \
87 ${PN}-memfd \
88 ${PN}-memory-hotplug \
89 ${PN}-mount \
90 ${PN}-mqueue \
91 ${PN}-net \
92 ${PN}-nsfs \
93 ${PN}-powerpc \
94 ${PN}-pstore \
95 ${PN}-ptrace \
96 ${PN}-seccomp \
97 ${PN}-sigaltstack \
98 ${PN}-size \
99 ${PN}-static-keys \
100 ${PN}-sysctl \
101 ${PN}-timers \
102 ${PN}-user \
103 ${PN}-vm \
104 ${PN}-x86 \
105 ${PN}-zram \
106"
107
108FILES_${PN}-breakpoints = "${bindir}/kselftests/breakpoints"
109FILES_${PN}-capabilities = "${bindir}/kselftests/capabilities"
110FILES_${PN}-cpu-hotplug = "${bindir}/kselftests/cpu-hotplug"
111FILES_${PN}-efivarfs = "${bindir}/kselftests/efivarfs"
112FILES_${PN}-exec = "${bindir}/kselftests/exec"
113FILES_${PN}-firmware = "${bindir}/kselftests/firmware"
114FILES_${PN}-ftrace = "${bindir}/kselftests/ftrace"
115FILES_${PN}-futex = "${bindir}/kselftests/futex"
116FILES_${PN}-ipc = "${bindir}/kselftests/ipc"
117FILES_${PN}-kcmp = "${bindir}/kselftests/kcmp"
118FILES_${PN}-lib = "${bindir}/kselftests/lib"
119FILES_${PN}-membarrier = "${bindir}/kselftests/membarrier"
120FILES_${PN}-memfd = "${bindir}/kselftests/memfd"
121FILES_${PN}-memory-hotplug = "${bindir}/kselftests/memory-hotplug"
122FILES_${PN}-mount = "${bindir}/kselftests/mount"
123FILES_${PN}-mqueue = "${bindir}/kselftests/mqueue"
124FILES_${PN}-net = "${bindir}/kselftests/net"
125FILES_${PN}-nsfs = "${bindir}/kselftests/nsfs"
126FILES_${PN}-powerpc = "${bindir}/kselftests/powerpc"
127FILES_${PN}-pstore = "${bindir}/kselftests/pstore"
128FILES_${PN}-ptrace = "${bindir}/kselftests/ptrace"
129FILES_${PN}-seccomp = "${bindir}/kselftests/seccomp"
130FILES_${PN}-sigaltstack = "${bindir}/kselftests/sigaltstack"
131FILES_${PN}-size = "${bindir}/kselftests/size"
132FILES_${PN}-static-keys = "${bindir}/kselftests/static_keys"
133FILES_${PN}-sysctl = "${bindir}/kselftests/sysctl"
134FILES_${PN}-timers = "${bindir}/kselftests/timers"
135FILES_${PN}-user = "${bindir}/kselftests/user"
136FILES_${PN}-vm = "${bindir}/kselftests/vm"
137FILES_${PN}-x86 = "${bindir}/kselftests/x86"
138FILES_${PN}-zram = "${bindir}/kselftests/zram"
139FILES_${PN}-dbg += "${bindir}/kselftests/*/.debug"
140
141RDEPENDS_${PN}-cpu-hotplug += "bash"
142RDEPENDS_${PN}-efivarfs += "bash"
143RDEPENDS_${PN}-memory-hotplug += "bash"
144RDEPENDS_${PN}-net += "bash"
145RDEPENDS_${PN}-vm += "bash"
146RDEPENDS_${PN}-zram += "bash"
147RDEPENDS_${PN} += "bash \
148 ${PN}-capabilities \
149 ${PN}-cpu-hotplug \
150 ${PN}-efivarfs \
151 ${PN}-exec \
152 ${PN}-firmware \
153 ${PN}-ftrace \
154 ${PN}-futex \
155 ${PN}-kcmp \
156 ${PN}-lib \
157 ${PN}-membarrier \
158 ${PN}-memfd \
159 ${PN}-memory-hotplug \
160 ${PN}-mount \
161 ${PN}-mqueue \
162 ${PN}-net \
163 ${PN}-nsfs \
164 ${PN}-pstore \
165 ${PN}-ptrace \
166 ${PN}-seccomp \
167 ${PN}-sigaltstack \
168 ${PN}-size \
169 ${PN}-static-keys \
170 ${PN}-sysctl \
171 ${PN}-timers \
172 ${PN}-user \
173 ${PN}-vm \
174 ${PN}-zram \
175"
176
177RDEPENDS_${PN}_append_x86 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86"
178RDEPENDS_${PN}_append_x86-64 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86"
179RDEPENDS_${PN}_append_powerpc = " ${PN}-powerpc"
180RDEPENDS_${PN}_append_powerpc64 = " ${PN}-powerpc"
181
182INSANE_SKIP_${PN} = "already-stripped"