* [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
@ 2026-04-06 2:35 Wei Gao via ltp
2026-04-24 10:22 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: Wei Gao via ltp @ 2026-04-06 2:35 UTC (permalink / raw)
To: ltp
LTP commit f630471a6520 attempted to handle this using a kernel version
check (7.0.0). However, this is proving unreliable as the change is
appearing in earlier kernel versions (e.g., 6.19.x) due to different
release cycles or backports.
Fixes: f630471a6520 ("ioctl_pidfd06: Select expected errno for PIDFD_GET_INFO across pidns")
Signed-off-by: Wei Gao <wegao@suse.com>
---
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
index 0f24d4741..fec85d680 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
@@ -14,7 +14,10 @@
static struct tst_clone_args *args;
static struct pidfd_info *info;
-static int err_nr = ESRCH;
+static int exp_errnos[] = {
+ ESRCH,
+ EREMOTE,
+};
static void run(void)
{
@@ -42,7 +45,10 @@ static void run(void)
args->exit_signal = SIGCHLD;
if (!SAFE_CLONE(args)) {
- TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), err_nr);
+ TST_EXP_FAIL_ARR(
+ ioctl(pidfd, PIDFD_GET_INFO, info),
+ exp_errnos, ARRAY_SIZE(exp_errnos)
+ );
exit(0);
}
@@ -53,9 +59,6 @@ static void setup(void)
{
if (!ioctl_pidfd_info_exit_supported())
tst_brk(TCONF, "PIDFD_INFO_EXIT is not supported by ioctl()");
-
- if (tst_kvercmp(7, 0, 0) >= 0)
- err_nr = EREMOTE;
}
static struct tst_test test = {
--
2.52.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
2026-04-06 2:35 [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO Wei Gao via ltp
@ 2026-04-24 10:22 ` Petr Vorel
2026-04-24 12:02 ` Wei Gao via ltp
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2026-04-24 10:22 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi,
I have no idea what superseded this patch. But as Wai prefers it [1] I set state
new. Alternative patch [2] [3], with discussion under v1 [4] [5].
Kind regards,
Petr
[1] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
[2] https://patchwork.ozlabs.org/project/ltp/patch/20260424101508.505501-1-pvorel@suse.cz/
[3] https://lore.kernel.org/ltp/20260424101508.505501-1-pvorel@suse.cz/T/#u
[4] https://patchwork.ozlabs.org/project/ltp/patch/20260424060543.462475-1-pvorel@suse.cz/
[5] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
2026-04-24 10:22 ` Petr Vorel
@ 2026-04-24 12:02 ` Wei Gao via ltp
2026-04-28 9:24 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: Wei Gao via ltp @ 2026-04-24 12:02 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Fri, Apr 24, 2026 at 12:22:38PM +0200, Petr Vorel wrote:
> Hi,
>
> I have no idea what superseded this patch. But as Wai prefers it [1] I set state
> new. Alternative patch [2] [3], with discussion under v1 [4] [5].
Thanks for change to new state.
>
> Kind regards,
> Petr
>
> [1] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
> [2] https://patchwork.ozlabs.org/project/ltp/patch/20260424101508.505501-1-pvorel@suse.cz/
> [3] https://lore.kernel.org/ltp/20260424101508.505501-1-pvorel@suse.cz/T/#u
> [4] https://patchwork.ozlabs.org/project/ltp/patch/20260424060543.462475-1-pvorel@suse.cz/
> [5] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
2026-04-24 12:02 ` Wei Gao via ltp
@ 2026-04-28 9:24 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2026-04-28 9:24 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
...
> > I have no idea what superseded this patch. But as Wai prefers it [1] I set state
> > new. Alternative patch [2] [3], with discussion under v1 [4] [5].
> Thanks for change to new state.
I got ack for my approach from Li and Jan and was pinged by Andrea to merge it,
therefore it got fixed in 068617a55d ("ioctl_pidfd06: Update kernel version")
and therefore closing this as rejected.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-28 9:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 2:35 [LTP] [PATCH v1] ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO Wei Gao via ltp
2026-04-24 10:22 ` Petr Vorel
2026-04-24 12:02 ` Wei Gao via ltp
2026-04-28 9:24 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox