Message ID | 20241202172953.769101-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | [RFC] kselftest: add recipe | expand |
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/RFC-kselftest-add-recipe.patch FAIL: test lic files chksum presence: LIC_FILES_CHKSUM is missing in newly added recipe (test_metadata.TestMetadata.test_lic_files_chksum_presence) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags) PASS: test license presence (test_metadata.TestMetadata.test_license_presence) PASS: test max line length (test_metadata.TestMetadata.test_max_line_length) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) PASS: test summary presence (test_metadata.TestMetadata.test_summary_presence) PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list) SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint) SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files) SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore) SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 4cac0647c2a..3485c9df1b0 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -304,6 +304,7 @@ RECIPE_MAINTAINER:pn-kexec-tools = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-keymaps = "Alexander Kanavin <alex.kanavin@gmail.com>" RECIPE_MAINTAINER:pn-kmod = "Chen Qi <Qi.Chen@windriver.com>" RECIPE_MAINTAINER:pn-kmscube = "Carlos Rafael Giani <crg7475@mailbox.org>" +RECIPE_MAINTAINER:pn-kselftest = "Ross Burton <ross.burton@arm.com>" RECIPE_MAINTAINER:pn-l3afpad = "Anuj Mittal <anuj.mittal@intel.com>" RECIPE_MAINTAINER:pn-lame = "Michael Opdenacker <michael@opdenacker.org>" RECIPE_MAINTAINER:pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>" diff --git a/meta/recipes-kernel/linux/kselftest.bb b/meta/recipes-kernel/linux/kselftest.bb new file mode 100644 index 00000000000..dec57aca071 --- /dev/null +++ b/meta/recipes-kernel/linux/kselftest.bb @@ -0,0 +1,65 @@ +SUMMARY = "kselftest, the kernel test suite" +SECTION = "kernel" +LICENSE = "GPL-2.0-only" + +DEPENDS = "rsync-native" + +inherit kernelsrc kernel-arch pkgconfig + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# Unconventional usage of PACKAGECONFIG to control how the tests are built. +# +# Enabled should be unused, Disabled is the list of test targets which should +# be skipped if this dependency isn't present. +PACKAGECONFIG ??= "alsa libcap libcapng netlink numa openssl popt" +PACKAGECONFIG[alsa] = ",alsa,alsa-lib" +PACKAGECONFIG[bpf] = ",bpf hid,clang-native elfutils" +PACKAGECONFIG[fuse] = ",,fuse" +PACKAGECONFIG[libcap] = ",,libcap" +PACKAGECONFIG[libcapng] = ",,libcap-ng" +PACKAGECONFIG[netlink] = ",,libmnl" +PACKAGECONFIG[numa] = ",,numactl" +PACKAGECONFIG[openssl] = ",,openssl" +PACKAGECONFIG[popt] = ",,popt" + +B = "${WORKDIR}/build" + +do_compile[cleandirs] = "${B}" + +CC:remove:aarch64 = "-mbranch-protection=standard" +SECURITY_CFLAGS = "" + +SKIP_TARGETS = "${PACKAGECONFIG_CONFARGS}" + +EXTRA_OEMAKE += "\ + O=${B} \ + V=1 \ + ARCH=${ARCH} \ + CROSS_COMPILE=${TARGET_PREFIX} \ + CC="${CC} ${DEBUG_PREFIX_MAP}" \ + AR="${AR}" \ + LD="${LD}" \ + HOSTPKG_CONFIG=pkg-config-native \ + SKIP_TARGETS="${SKIP_TARGETS}" \ +" + +# Force all tests to build successfully. Usually we just package what +# successfully builds. +# 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 so reset the permissions + chown -R root:root ${D}/${libexecdir}/kselftest +} + +RDEPENDS:${PN} += "bash coreutils grep iproute2 python3-core python3 perl perl-module-io-handle" + +# Some binaries appear to be explicitly built without debug info, and often +# don't pass LDFLAGS. As this is a testing tool this is acceptable. +INSANE_SKIP:${PN} = "ldflags already-stripped textrel"
There's a similar recipe in meta-oe (kernel-selftest) but it needs clang and seems overly complicated. This recipe still needs further improvements, primarily that there is no integration into oeqa, but that can come later. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/conf/distro/include/maintainers.inc | 1 + meta/recipes-kernel/linux/kselftest.bb | 65 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 meta/recipes-kernel/linux/kselftest.bb