From: Paul Dolan <paul.dolan.dev@gmail.com>
To: Christian Brauner <brauner@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Luca Boccassi <luca.boccassi@gmail.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH] selftests/pidfd: fix PPID values in error message
Date: Wed, 2 Sep 2026 17:26:15 +0100 [thread overview]
Message-ID: <20260902162615.11531-1-paul.dolan.dev@gmail.com> (raw)
The PIDFD_GET_INFO PPID check compares info.ppid against getppid(), but
its failure message prints pid and info.pid from the preceding PID
check.
Print the PPID values being compared so that a failure reports the
correct information.
Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info")
Signed-off-by: Paul Dolan <paul.dolan.dev@gmail.com>
---
tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/pidfd/pidfd_open_test.c b/tools/testing/selftests/pidfd/pidfd_open_test.c
index 318e6f09c8e0..c6698b7cdb47 100644
--- a/tools/testing/selftests/pidfd/pidfd_open_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_open_test.c
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
}
if (info.ppid != getppid()) {
ksft_print_msg("ppid %d does not match ppid from ioctl %d\n",
- pid, info.pid);
+ getppid(), info.ppid);
goto on_error;
}
if (info.ruid != getuid()) {
--
2.55.0
next reply other threads:[~2026-09-02 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 16:26 Paul Dolan [this message]
2026-09-04 7:50 ` [PATCH] selftests/pidfd: fix PPID values in error message Christian Brauner
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=20260902162615.11531-1-paul.dolan.dev@gmail.com \
--to=paul.dolan.dev@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=shuah@kernel.org \
/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