* [scarthgap][PATCH] ltp: fix epoll_ctl04 failed
@ 2026-04-15 3:22 Li Wang
0 siblings, 0 replies; only message in thread
From: Li Wang @ 2026-04-15 3:22 UTC (permalink / raw)
To: openembedded-core, li.wang
backport from ltp upstream commit:
https://github.com/linux-test-project/ltp/commit/e84f0689cf7a8a77478a0e70aa62560f66c3bceb
the related kernel patch was already merged into yocto linux:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f2e467a48287c868818085aa35389a224d226732
Signed-off-by: Li Wang <li.wang@windriver.com>
---
...l_ctl04-add-ELOOP-to-expected-errnos.patch | 49 +++++++++++++++++++
meta/recipes-extended/ltp/ltp_20240129.bb | 1 +
2 files changed, 50 insertions(+)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-syscalls-epoll_ctl04-add-ELOOP-to-expected-errnos.patch
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-epoll_ctl04-add-ELOOP-to-expected-errnos.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-epoll_ctl04-add-ELOOP-to-expected-errnos.patch
new file mode 100644
index 0000000000..203836a5f6
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-epoll_ctl04-add-ELOOP-to-expected-errnos.patch
@@ -0,0 +1,49 @@
+From e84f0689cf7a8a77478a0e70aa62560f66c3bceb Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Tue, 5 Aug 2025 11:27:23 +0200
+Subject: [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
+
+Kernel commit f2e467a48287 ("eventpoll: Fix semi-unbounded recursion")
+added an extra checks for determining the maximum depth of an upwards walk,
+which starting with 6.17-rc kernels now hits ELOOP before EINVAL.
+
+Add ELOOP to list of expected errnos.
+
+Upstream-Status: Backport from
+[https://github.com/linux-test-project/ltp/commit/e84f0689]
+
+Link: https://lore.kernel.org/ltp/39ee7abdee12e22074b40d46775d69d37725b932.1754386027.git.jstancek@redhat.com/
+Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Reviewed-by: Avinesh Kumar <akumar@suse.de>
+Tested-by: Avinesh Kumar <akumar@suse.de>
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+[ modify TST_EXP_FAIL2_ARR function parameters ]
+Signed-off-by: Li Wang <li.wang@windriver.com>
+---
+ testcases/kernel/syscalls/epoll_ctl/epoll_ctl04.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl04.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl04.c
+index 955959b6b26..feb49623b15 100644
+--- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl04.c
++++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl04.c
+@@ -51,13 +51,16 @@ static void cleanup(void)
+
+ static void verify_epoll_ctl(void)
+ {
++ const int exp_errnos[] = {EINVAL, ELOOP};
++
+ new_epfd = epoll_create(1);
+ if (new_epfd == -1)
+ tst_brk(TBROK | TERRNO, "fail to create epoll instance");
+
+ events.data.fd = epfd;
+- TST_EXP_FAIL(epoll_ctl(new_epfd, EPOLL_CTL_ADD, epfd, &events), EINVAL,
+- "epoll_ctl(..., EPOLL_CTL_ADD, ...) with number of nesting is 5");
++ TST_EXP_FAIL2_ARR(epoll_ctl(new_epfd, EPOLL_CTL_ADD, epfd, &events),
++ exp_errnos,
++ "epoll_ctl(..., EPOLL_CTL_ADD, ...) with number of nesting is 5");
+ SAFE_CLOSE(new_epfd);
+ }
+
diff --git a/meta/recipes-extended/ltp/ltp_20240129.bb b/meta/recipes-extended/ltp/ltp_20240129.bb
index 18c6439283..ec31c98544 100644
--- a/meta/recipes-extended/ltp/ltp_20240129.bb
+++ b/meta/recipes-extended/ltp/ltp_20240129.bb
@@ -31,6 +31,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
file://0001-scenario_groups-default-remove-connectors.patch \
file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \
file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \
+ file://0001-syscalls-epoll_ctl04-add-ELOOP-to-expected-errnos.patch \
"
S = "${WORKDIR}/git"
--
2.49.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-15 3:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15 3:22 [scarthgap][PATCH] ltp: fix epoll_ctl04 failed Li Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox