summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb')
-rw-r--r--meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb23
1 files changed, 13 insertions, 10 deletions
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index 430b5974b3..5c001696d0 100644
--- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
@@ -12,12 +12,17 @@ S = "${UNPACKDIR}"
12SRC_URI:append:libc-musl = "\ 12SRC_URI:append:libc-musl = "\
13 file://userfaultfd.patch \ 13 file://userfaultfd.patch \
14 " 14 "
15
16# Fix liburing detection (from Linux v7.0)
17MM_PATCH = "file://0001-selftests-mm-pass-down-full-CC-and-CFLAGS-to-check_c.patch"
18
15SRC_URI += "file://run-ptest \ 19SRC_URI += "file://run-ptest \
16 file://COPYING \ 20 file://COPYING \
17 file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \ 21 file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \
22 ${@bb.utils.contains('PACKAGECONFIG', 'mm', '${MM_PATCH}', '', d)} \
18 " 23 "
19 24
20# now we just test bpf and vm 25# now we just test bpf and mm (formerly known as vm)
21# we will append other kernel selftest in the future 26# we will append other kernel selftest in the future
22# bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d 27# bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d
23# if you have older kernel than that you need to remove it from PACKAGECONFIG 28# if you have older kernel than that you need to remove it from PACKAGECONFIG
@@ -25,20 +30,17 @@ PACKAGECONFIG ??= "firmware"
25# bpf needs working clang compiler anyway 30# bpf needs working clang compiler anyway
26PACKAGECONFIG:append:toolchain-clang:x86-64 = " bpf" 31PACKAGECONFIG:append:toolchain-clang:x86-64 = " bpf"
27PACKAGECONFIG:remove:x86 = "bpf" 32PACKAGECONFIG:remove:x86 = "bpf"
28PACKAGECONFIG:remove:arm = "bpf vm" 33PACKAGECONFIG:remove:arm = "bpf mm"
29# host ptrace.h is used to compile BPF target but mips ptrace.h is needed 34# host ptrace.h is used to compile BPF target but mips ptrace.h is needed
30# progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs' 35# progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs'
31# m = PT_REGS_RC(ctx); 36# m = PT_REGS_RC(ctx);
32# vm tests need libhugetlbfs starting 5.8+ (https://lkml.org/lkml/2020/4/22/1654) 37PACKAGECONFIG:remove:qemumips = "bpf"
33PACKAGECONFIG:remove:qemumips = "bpf vm" 38PACKAGECONFIG:remove:riscv64 = "bpf"
34 39PACKAGECONFIG:remove:riscv32 = "bpf"
35# riscv does not support libhugetlbfs yet
36PACKAGECONFIG:remove:riscv64 = "bpf vm"
37PACKAGECONFIG:remove:riscv32 = "bpf vm"
38 40
39PACKAGECONFIG[bpf] = ",,elfutils elfutils-native libcap libcap-ng rsync-native python3-docutils-native," 41PACKAGECONFIG[bpf] = ",,elfutils elfutils-native libcap libcap-ng rsync-native python3-docutils-native,"
40PACKAGECONFIG[firmware] = ",,libcap, bash" 42PACKAGECONFIG[firmware] = ",,libcap, bash"
41PACKAGECONFIG[vm] = ",,libcap libhugetlbfs,libgcc bash" 43PACKAGECONFIG[mm] = ",,libcap liburing numactl, libgcc bash"
42 44
43do_patch[depends] += "virtual/kernel:do_shared_workdir" 45do_patch[depends] += "virtual/kernel:do_shared_workdir"
44do_compile[depends] += "virtual/kernel:do_install" 46do_compile[depends] += "virtual/kernel:do_install"
@@ -48,7 +50,7 @@ inherit linux-kernel-base module-base kernel-arch ptest siteinfo
48DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" 50DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map"
49 51
50TEST_LIST = "\ 52TEST_LIST = "\
51 ${@bb.utils.filter('PACKAGECONFIG', 'bpf firmware vm', d)} \ 53 ${@bb.utils.filter('PACKAGECONFIG', 'bpf firmware mm', d)} \
52 cpufreq \ 54 cpufreq \
53 cpu-hotplug \ 55 cpu-hotplug \
54 rtc \ 56 rtc \
@@ -78,6 +80,7 @@ KERNEL_SELFTEST_SRC ?= "Makefile \
78 tools \ 80 tools \
79 scripts \ 81 scripts \
80 arch \ 82 arch \
83 ${@bb.utils.filter('PACKAGECONFIG', 'mm', d)} \
81 LICENSES \ 84 LICENSES \
82" 85"
83do_compile() { 86do_compile() {