public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Polensky <japo@linux.ibm.com>
To: chrubis@suse.cz, pvorel@suse.cz
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: [LTP] [PATCH v2 1/1] [STAGING] ioctl_pidfd06: accept EREMOTE/ESRCH for PIDFD_GET_INFO across pidns
Date: Thu, 19 Feb 2026 17:30:30 +0100	[thread overview]
Message-ID: <20260219163030.69022-1-japo@linux.ibm.com> (raw)

PIDFD_GET_INFO semantics changed for pidfds referring to tasks without a PID
in the caller's current pid namespace (commit ab89060fbc92e ("pidfs: return
-EREMOTE when PIDFD_GET_INFO is called on another ns")).

Accept both errnos to keep the test working on kernels with and without the
change (including backports).

Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
index 751281bacb74..6b4bc3191e37 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
@@ -14,6 +14,7 @@
 
 static struct tst_clone_args *args;
 static struct pidfd_info *info;
+static const int exp_errnos[] = {EREMOTE, ESRCH};
 
 static void run(void)
 {
@@ -41,7 +42,8 @@ static void run(void)
 	args->exit_signal = SIGCHLD;
 
 	if (!SAFE_CLONE(args)) {
-		TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), ESRCH);
+		TST_EXP_FAIL_ARR(ioctl(pidfd, PIDFD_GET_INFO, info), exp_errnos,
+				ARRAY_SIZE(exp_errnos));
 		exit(0);
 	}
 
-- 
2.53.0


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

             reply	other threads:[~2026-02-19 16:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 16:30 Jan Polensky [this message]
2026-02-19 20:06 ` [LTP] [PATCH v2 1/1] [STAGING] ioctl_pidfd06: accept EREMOTE/ESRCH for PIDFD_GET_INFO across pidns Petr Vorel
2026-02-20 10:08 ` Andrea Cervesato via ltp
2026-02-20 10:48 ` Cyril Hrubis
2026-02-20 11:33   ` Petr Vorel
2026-02-20 15:05   ` Jan Polensky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260219163030.69022-1-japo@linux.ibm.com \
    --to=japo@linux.ibm.com \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox