linux/tools/testing/selftests/pidfd
Maciej Wieczor-Retman 4d7f4e8158 selftests/pidfd: Fix ksft print formats
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>
2023-10-13 14:08:21 -06:00
..
.gitignore
config
Makefile selftests: pidfd: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
pidfd.h selftest: pidfd: Omit long and repeating outputs 2023-06-12 16:39:11 -06:00
pidfd_fdinfo_test.c selftests/pidfd: Fix ksft print formats 2023-10-13 14:08:21 -06:00
pidfd_getfd_test.c
pidfd_open_test.c
pidfd_poll_test.c
pidfd_setns_test.c
pidfd_test.c selftests/pidfd: Fix ksft print formats 2023-10-13 14:08:21 -06:00
pidfd_wait.c selftests: pidfd: Fix compling warnings 2022-10-30 02:23:58 -06:00