ltp-ddt repo has been rebased on top of 20250930, update the recipe to match.
Signed-off-by: Ryan Eatmon <[email protected]> --- ...-__clear_cache-declaration-for-clang.patch | 32 +++ ...001-Remove-OOM-tests-from-runtest-mm.patch | 8 +- ...unt04-Update-for-6.18-kernel-headers.patch | 54 ----- ...8-Skip-semctl08-when-__USE_TIME64_RE.patch | 45 ++++ ...6ead3d6ef504c82551b12306e751d23ddb45.patch | 193 ++++++++++++++++++ ...tp-ddt_20250130.bb => ltp-ddt_20250930.bb} | 6 +- .../{ltp_20250130.inc => ltp_20250930.inc} | 12 +- 7 files changed, 286 insertions(+), 64 deletions(-) create mode 100644 meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Add-__clear_cache-declaration-for-clang.patch delete mode 100644 meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-listmount04-Update-for-6.18-kernel-headers.patch create mode 100644 meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch create mode 100644 meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/2d066ead3d6ef504c82551b12306e751d23ddb45.patch rename meta-arago-test/recipes-devtools/ltp-ddt/{ltp-ddt_20250130.bb => ltp-ddt_20250930.bb} (87%) rename meta-arago-test/recipes-devtools/ltp-ddt/{ltp_20250130.inc => ltp_20250930.inc} (92%) diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Add-__clear_cache-declaration-for-clang.patch b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Add-__clear_cache-declaration-for-clang.patch new file mode 100644 index 00000000..24e8762f --- /dev/null +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Add-__clear_cache-declaration-for-clang.patch @@ -0,0 +1,32 @@ +From a2ce04cb82d545f3dbab71de7fa55eaad3df3063 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 10 Jun 2024 22:52:56 -0700 +Subject: [PATCH] Add __clear_cache declaration for clang + +__clear_cache was enabled on RISCV recently with 7352ba02390116f1cd6a9b583860ba28aa0a1b7a +however it fails to compile with clang19 on RISCV +With this error + + hugemmap15.c:51:2: error: call to undeclared function '__clear_cache'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + 51 | __clear_cache(p, p + COPY_SIZE); + | ^ + +Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2024-June/038762.html] +Signed-off-by: Khem Raj <[email protected]> +Cc: Hui Min Mina Chou <[email protected]> +--- + testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c +index 1dde9e87b..6a6f5fe5e 100644 +--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c ++++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c +@@ -19,6 +19,7 @@ + + #if defined(__clang__) + #pragma clang optimize off ++ void __clear_cache(void *start, void *end); + #endif + + #define _GNU_SOURCE diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Remove-OOM-tests-from-runtest-mm.patch b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Remove-OOM-tests-from-runtest-mm.patch index 5b6c780b..860b2f12 100644 --- a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Remove-OOM-tests-from-runtest-mm.patch +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-Remove-OOM-tests-from-runtest-mm.patch @@ -1,4 +1,4 @@ -From 768159aa53257d247645a12518778f50b8fdf578 Mon Sep 17 00:00:00 2001 +From bb9146dd322af98a7bb96ad0d84ec376589c6cde Mon Sep 17 00:00:00 2001 From: "Mingde (Matthew) Zeng" <[email protected]> Date: Wed, 29 Jul 2020 08:47:09 -0400 Subject: [PATCH] Remove OOM tests from runtest/mm @@ -14,12 +14,12 @@ Signed-off-by: Petr Vorel <[email protected]> 1 file changed, 6 deletions(-) diff --git a/runtest/mm b/runtest/mm -index 6a8cd0b9d..8ce3f4416 100644 +index 41d624ad8..1e8c22638 100644 --- a/runtest/mm +++ b/runtest/mm -@@ -76,12 +76,6 @@ ksm07 ksm07 - +@@ -69,12 +69,6 @@ ksm07 ksm07 cpuset01 cpuset01 + cpuset02 cpuset02 -oom01 oom01 -oom02 oom02 diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-listmount04-Update-for-6.18-kernel-headers.patch b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-listmount04-Update-for-6.18-kernel-headers.patch deleted file mode 100644 index 2c002e40..00000000 --- a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-listmount04-Update-for-6.18-kernel-headers.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 2dab76490d8d9b30119204a6376e00176fad9b07 Mon Sep 17 00:00:00 2001 -From: Ryan Eatmon <[email protected]> -Date: Mon, 29 Dec 2025 12:42:29 -0600 -Subject: [PATCH] listmount04: Update for 6.18 kernel headers - -The spare slot is now being used as of the 6.18 kernel. - -Upstream-Status: Pending - -Signed-off-by: Ryan Eatmon <[email protected]> ---- - testcases/kernel/syscalls/listmount/listmount04.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c -index d38408d2c..2053532f6 100644 ---- a/testcases/kernel/syscalls/listmount/listmount04.c -+++ b/testcases/kernel/syscalls/listmount/listmount04.c -@@ -28,7 +28,7 @@ static uint64_t mnt_ids[MNT_SIZE]; - static struct tcase { - int req_usage; - uint32_t size; -- uint32_t spare; -+ uint32_t mnt_ns_fd; - uint64_t mnt_id; - uint64_t param; - uint64_t *mnt_ids; -@@ -75,12 +75,12 @@ static struct tcase { - { - .req_usage = 1, - .size = MNT_ID_REQ_SIZE_VER0, -- .spare = -1, -+ .mnt_ns_fd = -1, - .mnt_id = LSMT_ROOT, - .mnt_ids = mnt_ids, - .nr_mnt_ids = MNT_SIZE, - .exp_errno = EINVAL, -- .msg = "invalid mnt_id_req.spare", -+ .msg = "invalid mnt_id_req.mnt_ns_fd", - }, - { - .req_usage = 1, -@@ -124,7 +124,7 @@ static void run(unsigned int n) - req->mnt_id = tc->mnt_id; - req->param = tc->param; - req->size = tc->size; -- req->spare = tc->spare; -+ req->mnt_ns_fd = tc->mnt_ns_fd; - } - - TST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids, --- -2.43.0 - diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch new file mode 100644 index 00000000..364e203e --- /dev/null +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch @@ -0,0 +1,45 @@ +From 09364a758df9d89a0968894376f82f636441addb Mon Sep 17 00:00:00 2001 +From: Jiaying Song <[email protected]> +Date: Fri, 23 May 2025 15:17:49 +0800 +Subject: [PATCH] syscalls/semctl08: Skip semctl08 when __USE_TIME64_REDIRECTS + is defined + +When __USE_TIME64_REDIRECTS is defined, glibc redirects struct semid_ds to a +64-bit time-safe version that omits the sem_otime_high and sem_ctime_high +fields. As a result, the case becomes invalid and leads to incorrect behavior. + +This patch adds a check to skip the test when __USE_TIME64_REDIRECTS is +defined, ensuring the test only runs when semid_ds structurally matches +semid64_ds and the *_high fields are accessible. + +Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2025-May/043647.html] + +Signed-off-by: Jiaying Song <[email protected]> +--- + testcases/kernel/syscalls/ipc/semctl/semctl08.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl08.c b/testcases/kernel/syscalls/ipc/semctl/semctl08.c +index f4549adf4..28776f266 100644 +--- a/testcases/kernel/syscalls/ipc/semctl/semctl08.c ++++ b/testcases/kernel/syscalls/ipc/semctl/semctl08.c +@@ -12,7 +12,11 @@ + #include "tst_test.h" + #include "libnewipc.h" + +-#ifdef HAVE_SEMID64_DS_TIME_HIGH ++#if !defined(HAVE_SEMID64_DS_TIME_HIGH) ++TST_TEST_TCONF("test requires struct semid64_ds to have the time_high fields"); ++#elif defined(__USE_TIME64_REDIRECTS) ++TST_TEST_TCONF("test requires __USE_TIME64_REDIRECTS to be undefined"); ++#else + + static void run(void) + { +@@ -49,6 +53,4 @@ static struct tst_test test = { + .test_all = run, + .needs_tmpdir = 1, + }; +-#else +-TST_TEST_TCONF("test requires struct semid64_ds to have the time_high fields"); + #endif diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/2d066ead3d6ef504c82551b12306e751d23ddb45.patch b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/2d066ead3d6ef504c82551b12306e751d23ddb45.patch new file mode 100644 index 00000000..1c06e254 --- /dev/null +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt/2d066ead3d6ef504c82551b12306e751d23ddb45.patch @@ -0,0 +1,193 @@ +From 2d066ead3d6ef504c82551b12306e751d23ddb45 Mon Sep 17 00:00:00 2001 +From: Wei Gao <[email protected]> +Date: Sun, 14 Dec 2025 02:15:20 +0000 +Subject: [PATCH] listmount04.c: Update struct mnt_id_req support for kernel >= 6.18 + +Kernel change from v6.18-rc7 +78f0e33cd6c93 ("fs/namespace: correctly handle errors returned by grab_requested_mnt_ns") +causes the test failure with following error message: +listmount04.c:128: TFAIL: invalid mnt_id_req.spare expected EINVAL: EBADF (9) + +The fix require following changes: + +* struct mnt_id_req got new member mnt_ns_fd in v6.18-rc7. That is +fixed in a fallback defintion in lapi/. If the fallback is used is now +done via typedef (that requires also update in statmount.h). + +* New kernels (>= 6.18) have also different errno. This is fixed by +runtime check. + +Link: https://lore.kernel.org/ltp/[email protected]/ +Reviewed-by: Petr Vorel <[email protected]> +Reviewed-by: Li Wang <[email protected]> +Reviewed-by: Cyril Hrubis <[email protected]> +Signed-off-by: Wei Gao <[email protected]> +[ pvorel: Shorten TCONF, rewrite commit message ] +Signed-off-by: Petr Vorel <[email protected]> +--- + configure.ac | 2 +- + include/lapi/mount.h | 10 +++-- + .../kernel/syscalls/listmount/listmount.h | 2 +- + .../kernel/syscalls/listmount/listmount04.c | 37 +++++++++++++++++-- + .../kernel/syscalls/statmount/statmount.h | 2 +- + 5 files changed, 44 insertions(+), 9 deletions(-) + +Upstream-Status: Backport + +Index: ltp-20250930/configure.ac +=================================================================== +--- ltp-20250930.orig/configure.ac ++++ ltp-20250930/configure.ac +@@ -262,7 +262,7 @@ AC_CHECK_TYPES([struct cachestat_range], + AC_CHECK_TYPES([struct cachestat],,,[#include <sys/mman.h>]) + + # Defined in <linux/mount.h>, but include/lapi/mount.h includes <sys/mount.h> */ +-AC_CHECK_TYPES([struct mnt_id_req],,,[#include <sys/mount.h>]) ++AC_CHECK_MEMBERS([struct mnt_id_req.mnt_ns_fd],,,[#include <sys/mount.h>]) + AC_CHECK_TYPES([struct statmount],,,[#include <sys/mount.h>]) + AC_CHECK_MEMBERS([struct statmount.mnt_ns_id],,,[#include <unistd.h> + #include <linux/mount.h>]) +Index: ltp-20250930/include/lapi/mount.h +=================================================================== +--- ltp-20250930.orig/include/lapi/mount.h ++++ ltp-20250930/include/lapi/mount.h +@@ -45,14 +45,18 @@ + # define MS_NOSYMFOLLOW 256 + #endif + +-#ifndef HAVE_STRUCT_MNT_ID_REQ +-struct mnt_id_req { ++struct mnt_id_req_fallback { + uint32_t size; +- uint32_t spare; ++ uint32_t mnt_ns_fd; + uint64_t mnt_id; + uint64_t param; + uint64_t mnt_ns_id; + }; ++ ++#ifndef HAVE_STRUCT_MNT_ID_REQ_MNT_NS_FD ++typedef struct mnt_id_req_fallback mnt_id_req; ++#else ++typedef struct mnt_id_req mnt_id_req; + #endif + + #ifndef HAVE_STRUCT_STATMOUNT +Index: ltp-20250930/testcases/kernel/syscalls/listmount/listmount.h +=================================================================== +--- ltp-20250930.orig/testcases/kernel/syscalls/listmount/listmount.h ++++ ltp-20250930/testcases/kernel/syscalls/listmount/listmount.h +@@ -15,7 +15,7 @@ + static inline ssize_t listmount(uint64_t mnt_id, uint64_t last_mnt_id, + uint64_t list[], size_t num, unsigned int flags) + { +- struct mnt_id_req req = { ++ mnt_id_req req = { + .size = MNT_ID_REQ_SIZE_VER0, + .mnt_id = mnt_id, + .param = last_mnt_id, +Index: ltp-20250930/testcases/kernel/syscalls/listmount/listmount04.c +=================================================================== +--- ltp-20250930.orig/testcases/kernel/syscalls/listmount/listmount04.c ++++ ltp-20250930/testcases/kernel/syscalls/listmount/listmount04.c +@@ -14,14 +14,18 @@ + + #define _GNU_SOURCE + ++#include "config.h" + #include "tst_test.h" + #include "lapi/mount.h" + #include "lapi/syscalls.h" + + #define MNT_SIZE 32 ++#define BEFORE_6_18 1 ++#define AFTER_6_18 2 + +-static struct mnt_id_req *request; ++static mnt_id_req *request; + static uint64_t mnt_ids[MNT_SIZE]; ++static int kver; + + static struct tcase { + int req_usage; +@@ -34,6 +38,7 @@ static struct tcase { + uint64_t flags; + int exp_errno; + char *msg; ++ int kver; + } tcases[] = { + { + .req_usage = 0, +@@ -79,6 +84,18 @@ static struct tcase { + .nr_mnt_ids = MNT_SIZE, + .exp_errno = EINVAL, + .msg = "invalid mnt_id_req.spare", ++ .kver = BEFORE_6_18, ++ }, ++ { ++ .req_usage = 1, ++ .size = MNT_ID_REQ_SIZE_VER0, ++ .spare = -1, ++ .mnt_id = LSMT_ROOT, ++ .mnt_ids = mnt_ids, ++ .nr_mnt_ids = MNT_SIZE, ++ .exp_errno = EBADF, ++ .msg = "invalid mnt_id_req.mnt_ns_fd", ++ .kver = AFTER_6_18, + }, + { + .req_usage = 1, +@@ -113,7 +130,12 @@ static struct tcase { + static void run(unsigned int n) + { + struct tcase *tc = &tcases[n]; +- struct mnt_id_req *req = NULL; ++ mnt_id_req *req = NULL; ++ ++ if (tc->kver && tc->kver != kver) { ++ tst_res(TCONF, "Test not suitable for current kernel version"); ++ return; ++ } + + memset(mnt_ids, 0, sizeof(mnt_ids)); + +@@ -122,7 +144,7 @@ static void run(unsigned int n) + req->mnt_id = tc->mnt_id; + req->param = tc->param; + req->size = tc->size; +- req->spare = tc->spare; ++ req->mnt_ns_fd = tc->spare; + } + + TST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids, +@@ -130,8 +152,17 @@ static void run(unsigned int n) + "%s", tc->msg); + } + ++static void setup(void) ++{ ++ if (tst_kvercmp(6, 18, 0) >= 0) ++ kver = AFTER_6_18; ++ else ++ kver = BEFORE_6_18; ++} ++ + static struct tst_test test = { + .test = run, ++ .setup = setup, + .tcnt = ARRAY_SIZE(tcases), + .min_kver = "6.8", + .bufs = (struct tst_buffers []) { +Index: ltp-20250930/testcases/kernel/syscalls/statmount/statmount.h +=================================================================== +--- ltp-20250930.orig/testcases/kernel/syscalls/statmount/statmount.h ++++ ltp-20250930/testcases/kernel/syscalls/statmount/statmount.h +@@ -16,7 +16,7 @@ + static inline int statmount(uint64_t mnt_id, uint64_t mask, struct statmount *buf, + size_t bufsize, unsigned int flags) + { +- struct mnt_id_req req = { ++ mnt_id_req req = { + .size = MNT_ID_REQ_SIZE_VER0, + .mnt_id = mnt_id, + .param = mask, diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250130.bb b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250930.bb similarity index 87% rename from meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250130.bb rename to meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250930.bb index 11bbf13a..96250e09 100644 --- a/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250130.bb +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp-ddt_20250930.bb @@ -1,3 +1,5 @@ +FILESEXTRAPATHS:prepend := "${TITESTBASE}/recipes-devtools/ltp-ddt/ltp-ddt:" + require ltp_${PV}.inc SUMMARY = "Embedded Linux Device Driver Tests based on Linux Test Project" @@ -9,14 +11,12 @@ PE = "1" PR = "r1" PV:append = "+git" -SRCREV = "d23395da4e67855a7d7ce476e44f79b8e604998e" +SRCREV = "be5e3b1ceaf18498c4586e9806ff2783ab336072" BRANCH ?= "master" SRC_URI:remove = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https" SRC_URI:prepend = "git://git.ti.com/git/test-automation/ltp-ddt.git;protocol=https;branch=${BRANCH} " -SRC_URI += "file://0001-listmount04-Update-for-6.18-kernel-headers.patch" - export prefix = "/opt/ltp" export exec_prefix = "/opt/ltp" diff --git a/meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250130.inc b/meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250930.inc similarity index 92% rename from meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250130.inc rename to meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250930.inc index 5e0163e0..30897de7 100644 --- a/meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250130.inc +++ b/meta-arago-test/recipes-devtools/ltp-ddt/ltp_20250930.inc @@ -24,11 +24,14 @@ TUNE_CCARGS:remove:x86-64 = "-mfpmath=sse" CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__" CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "a7c31dff7edc089a32e990765e12952cc4d7666a" +SRCREV = "d2550ffbbcfe163212cd7e9c132db65ae0fa06ed" SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ file://0001-Remove-OOM-tests-from-runtest-mm.patch \ - " + file://0001-Add-__clear_cache-declaration-for-clang.patch \ + file://0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch \ + file://2d066ead3d6ef504c82551b12306e751d23ddb45.patch \ + " inherit autotools-brokensep pkgconfig @@ -117,6 +120,8 @@ FILES:${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${pr INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" INSANE_SKIP:${PN} += "already-stripped staticdev" +CACHED_CONFIGUREVARS:libc-musl = "ac_cv_type_struct_mnt_id_req=no ac_cv_type_struct_statmount=no" + remove_broken_musl_sources() { [ "${TCLIBC}" = "musl" ] || return 0 @@ -130,7 +135,8 @@ remove_broken_musl_sources() { testcases/kernel/syscalls/getcontext/getcontext01.c \ testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \ testcases/kernel/syscalls/timer_create/timer_create01.c \ - testcases/kernel/syscalls/timer_create/timer_create03.c + testcases/kernel/syscalls/timer_create/timer_create03.c \ + testcases/kernel/syscalls/statmount/statmount02.c } do_patch[postfuncs] += "remove_broken_musl_sources" -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16976): https://lists.yoctoproject.org/g/meta-arago/message/16976 Mute This Topic: https://lists.yoctoproject.org/mt/117302536/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
