tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
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
© 2016 - 2026 Red Hat, Inc.