All of lore.kernel.org
 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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Andrea Cervesato via ltp @ 2025-08-05  9:39 UTC (permalink / raw)
  To: Jan Stancek, ltp

Thanks, it looks good.

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>


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

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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  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
  3 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2025-08-05 11:43 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi Jan,
> 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.

Good catch, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  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
  3 siblings, 0 replies; 7+ messages in thread
From: Avinesh Kumar @ 2025-08-13 16:59 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi,

Reviewed-by: Avinesh Kumar <akumar@suse.de>
Tested-by: Avinesh Kumar <akumar@suse.de>

tst_test.c:2007: TINFO: Tested kernel: 6.17.0-rc1-1-default+ #11 SMP PREEMPT_DYNAMIC Wed Aug 13 16:42:23 CEST 2025 x86_64
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_kconfig.c:676: TINFO: CONFIG_FAULT_INJECTION kernel option detected which might slow the execution
tst_test.c:1825: TINFO: Overall timeout per run is 0h 02m 00s
epoll_ctl04.c:61: TPASS: epoll_ctl(..., EPOLL_CTL_ADD, ...) with number of nesting is 5 : ELOOP (40)


Thank you,
Avinesh


On Tuesday, August 5, 2025 11:27:23 AM CEST Jan Stancek via ltp wrote:
> 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);
>  }
>  
> 





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

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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  2025-08-05  9:27 [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos Jan Stancek via ltp
                   ` (2 preceding siblings ...)
  2025-08-13 16:59 ` Avinesh Kumar
@ 2025-08-13 17:03 ` Avinesh Kumar
  2025-08-14  4:26   ` Petr Vorel
  3 siblings, 1 reply; 7+ messages in thread
From: Avinesh Kumar @ 2025-08-13 17:03 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi,
Also below typo fix in commit message.

Thanks!


On Tuesday, August 5, 2025 11:27:23 AM CEST Jan Stancek via ltp wrote:
> 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.
s/startign/starting


> 
> 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);
>  }
>  
> 





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

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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  2025-08-13 17:03 ` Avinesh Kumar
@ 2025-08-14  4:26   ` Petr Vorel
  2025-08-18  5:27     ` Jan Stancek via ltp
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2025-08-14  4:26 UTC (permalink / raw)
  To: Avinesh Kumar; +Cc: ltp

Hi Jan, all,

> Hi,
> Also below typo fix in commit message.

> Thanks!


> On Tuesday, August 5, 2025 11:27:23 AM CEST Jan Stancek via ltp wrote:
> > 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.
> s/startign/starting

I dared to merge your patch, with above description fixed.

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH] syscalls/epoll_ctl04: add ELOOP to expected errnos
  2025-08-14  4:26   ` Petr Vorel
@ 2025-08-18  5:27     ` Jan Stancek via ltp
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Stancek via ltp @ 2025-08-18  5:27 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, Aug 14, 2025 at 6:26 AM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Jan, all,
>
> > Hi,
> > Also below typo fix in commit message.
>
> > Thanks!
>
>
> > On Tuesday, August 5, 2025 11:27:23 AM CEST Jan Stancek via ltp wrote:
> > > 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.
> > s/startign/starting
>
> I dared to merge your patch, with above description fixed.

Thanks (I went on holidays before I could merge this).

>
> Kind regards,
> Petr
>


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

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.