* [PATCH] selftests/pidfd: fix PPID values in error message
@ 2026-09-02 16:26 Paul Dolan
2026-09-04 7:50 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Paul Dolan @ 2026-09-02 16:26 UTC (permalink / raw)
To: Christian Brauner, Shuah Khan
Cc: Luca Boccassi, linux-kernel, linux-kselftest
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/pidfd: fix PPID values in error message
2026-09-02 16:26 [PATCH] selftests/pidfd: fix PPID values in error message Paul Dolan
@ 2026-09-04 7:50 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2026-09-04 7:50 UTC (permalink / raw)
To: Shuah Khan, Paul Dolan; +Cc: Luca Boccassi, linux-kernel, linux-kselftest
On Wed, 02 Sep 2026 17:26:15 +0100, Paul Dolan wrote:
> 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.
>
> [...]
Applied to the vfs-7.4.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.4.misc
[1/1] selftests/pidfd: fix PPID values in error message
https://git.kernel.org/vfs/vfs/c/b4ad6eb49532
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-04 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 16:26 [PATCH] selftests/pidfd: fix PPID values in error message Paul Dolan
2026-09-04 7:50 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox