Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
@ 2025-08-05  9:27 Jan Stancek via ltp
  2025-08-05  9:39 ` Andrea Cervesato via ltp
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jan Stancek via ltp @ 2025-08-05  9:27 UTC (permalink / raw)
  To: ltp

Kernel commit f2e467a48287 ("eventpoll: Fix semi-unbounded recursion")
added an extra checks for determining the maximum depth of an upwards walk,
which startign with 6.17-rc kernels now hits ELOOP before EINVAL.

Add ELOOP to list of expected errnos.

Signed-off-by: Jan Stancek <jstancek@redhat.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 955959b6b266..feb49623b15e 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, ARRAY_SIZE(exp_errnos),
+		"epoll_ctl(..., EPOLL_CTL_ADD, ...) with number of nesting is 5");
 	SAFE_CLOSE(new_epfd);
 }
 
-- 
2.47.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-18  5:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05  9:27 [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos Jan Stancek via ltp
2025-08-05  9:39 ` Andrea Cervesato via ltp
2025-08-05 11:43 ` Petr Vorel
2025-08-13 16:59 ` Avinesh Kumar
2025-08-13 17:03 ` Avinesh Kumar
2025-08-14  4:26   ` Petr Vorel
2025-08-18  5:27     ` Jan Stancek via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox