1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-17 04:07:18 +00:00

kselftest: add kselftest recipe and integrate into testimage

Package up the kselftest from the kernel, and execute the arm64 GCS tests
inside CI.

At the moment some of the tests fail: gcs_write_fault and gcs_stress.
Mark the test as expected to fail until this is resolved.

Signed-off-by: Ross Burton <ross.burton@arm.com>
This commit is contained in:
Ross Burton
2024-07-01 18:11:14 +01:00
parent 0d3bc7947a
commit bb98b3c2dc
3 changed files with 74 additions and 4 deletions
@@ -0,0 +1,51 @@
SUMMARY = "kselftest, the kernel test suite"
SECTION = "kernel"
LICENSE = "GPL-2.0-only"
DEPENDS = "rsync-native alsa-lib libcap libcap-ng numactl popt libmnl"
inherit kernelsrc kernel-arch
PACKAGE_ARCH = "${MACHINE_ARCH}"
B = "${WORKDIR}/build"
do_compile[cleandirs] = "${B}"
CC:remove:aarch64 = "-mbranch-protection=standard"
SECURITY_CFLAGS = ""
# Disable BPF and HID as they need clang for BPF compilation
SKIP_TARGETS ?= "bpf hid"
EXTRA_OEMAKE += "\
O=${B} \
V=1 \
ARCH=${ARCH} \
CROSS_COMPILE=${TARGET_PREFIX} \
CC="${CC}" \
AR="${AR}" \
LD="${LD}" \
KHDR_INCLUDES="-isystem ${STAGING_KERNEL_BUILDDIR}" \
SKIP_TARGETS="${SKIP_TARGETS}" \
"
# Force all tests to build successfully
#EXTRA_OEMAKE += "FORCE_TARGETS=1"
do_compile() {
oe_runmake -C ${S}/tools/testing/selftests
}
do_install() {
oe_runmake -C ${S}/tools/testing/selftests install INSTALL_PATH=${D}/${libexecdir}/kselftest
# install uses rsync -a
chown -R root:root ${D}/${libexecdir}/kselftest
}
RDEPENDS:${PN} += "bash python3-core python3 perl perl-module-io-handle"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INSANE_SKIP:${PN} = "already-stripped buildpaths ldflags textrel"
# TODO test with musl