ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
PATCH 1/1 ioctl_pidfd06: Accept both ESRCH and EREMOTE for PIDFD_GET_INFO
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.
--- testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +8 -5
@@ -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 = {
Signature · 5 lines
2.52.0 -- Mailing list info: https://lists.linux.it/listinfo/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/[email protected]/
[3] https://lore.kernel.org/ltp/[email protected]/T/#u
[4] https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
[5] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 4 lines · Petr Vorel
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.
Quoted 9 lines
Kind regards,
Petr[1] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
[2] https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
[3] https://lore.kernel.org/ltp/[email protected]/T/#u
[4] https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
[5] https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#m58cbc2ecf73d7448bcb466a4a84b6845f147c1b9
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Wei,
...
Quoted 3 lines
Quoted 2 lines
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp