WSL2-Linux-Kernel/tools/testing/selftests/pidfd
Maciej Wieczor-Retman 2d2300fcf8 selftests/pidfd: Fix ksft print formats
[ Upstream commit 4d7f4e8158b62f63031510cdc24acc520956c091 ]

Compiling pidfd selftest after adding a __printf() attribute to
ksft_print_msg() and ksft_test_result_pass() exposes -Wformat warnings
in error_report(), test_pidfd_poll_exec_thread(),
child_poll_exec_test(), test_pidfd_poll_leader_exit_thread(),
child_poll_leader_exit_test().

The ksft_test_result_pass() in error_report() expects a string but
doesn't provide any argument after the format string. All the other
calls to ksft_print_msg() in the functions mentioned above have format
strings that don't match with other passed arguments.

Fix format specifiers so they match the passed variables.

Add a missing variable to ksft_test_result_pass() inside
error_report() so it matches other cases in the switch statement.

Fixes: 2def297ec7 ("pidfd: add tests for NSpid info in fdinfo")

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:08:22 +01:00
..
.gitignore selftests/pidfd: add pidfd setns tests 2020-05-13 11:41:22 +02:00
Makefile selftests/pidfd: add pidfd setns tests 2020-05-13 11:41:22 +02:00
config selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config 2020-10-27 17:02:03 -06:00
pidfd.h pidfd: fix test failure due to stack overflow on some arches 2022-02-23 12:03:18 +01:00
pidfd_fdinfo_test.c selftests/pidfd: Fix ksft print formats 2023-11-20 11:08:22 +01:00
pidfd_getfd_test.c selftests: pidfd: skip test on kcmp() ENOSYS 2020-10-27 17:01:45 -06:00
pidfd_open_test.c selftests: pidfd: fix compilation errors due to wait.h 2020-10-27 16:51:36 -06:00
pidfd_poll_test.c selftests: pidfd: fix compilation errors due to wait.h 2020-10-27 16:51:36 -06:00
pidfd_setns_test.c selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c 2020-10-27 17:04:01 -06:00
pidfd_test.c selftests/pidfd: Fix ksft print formats 2023-11-20 11:08:22 +01:00
pidfd_wait.c selftests: fixup build warnings in pidfd / clone3 tests 2022-02-23 12:03:18 +01:00