kernel-selftest: fix mm selftests dependencies

Add numa (numactl), as required by rmap, migration, and others.

Add liburing, otherwise some tests would be disabled.

Moreover, liburing's availability is checked in a shell script executed
prior to the compilation of the individual test cases. This script,
however, does not read CFLAGS.

Backport a fix [1] from mainline to address this issue.

[1] https://github.com/torvalds/linux/commit/7f532d19c8be76ad2fcd7ab6b0c9eb618f70966b

Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Joao Marcos Costa
2026-04-20 13:17:11 +02:00
committed by Khem Raj
parent a407a3e533
commit 06ddb535df
2 changed files with 82 additions and 1 deletions
@@ -12,9 +12,14 @@ S = "${UNPACKDIR}"
SRC_URI:append:libc-musl = "\
file://userfaultfd.patch \
"
# Fix liburing detection (from Linux v7.0)
MM_PATCH = "file://0001-selftests-mm-pass-down-full-CC-and-CFLAGS-to-check_c.patch"
SRC_URI += "file://run-ptest \
file://COPYING \
file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \
${@bb.utils.contains('PACKAGECONFIG', 'mm', '${MM_PATCH}', '', d)} \
"
# now we just test bpf and mm (formerly known as vm)
@@ -35,7 +40,7 @@ PACKAGECONFIG:remove:riscv32 = "bpf"
PACKAGECONFIG[bpf] = ",,elfutils elfutils-native libcap libcap-ng rsync-native python3-docutils-native,"
PACKAGECONFIG[firmware] = ",,libcap, bash"
PACKAGECONFIG[mm] = ",,libcap, libgcc bash"
PACKAGECONFIG[mm] = ",,libcap liburing numactl, libgcc bash"
do_patch[depends] += "virtual/kernel:do_shared_workdir"
do_compile[depends] += "virtual/kernel:do_install"