selftests/breakpoints: Fix format specifier in ksft_print_msg in step_after_suspend_t...
authorangquan yu <angquan21@gmail.com>
Tue, 28 Nov 2023 21:48:54 +0000 (15:48 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 30 Nov 2023 21:32:34 +0000 (14:32 -0700)
In the function 'tools/testing/selftests/breakpoints/run_test' within
step_after_suspend_test.c, the ksft_print_msg function call incorrectly
used '$s' as a format specifier. This commit corrects this typo to use the
proper '%s' format specifier, ensuring the error message from
waitpid() is correctly displayed.

The issue manifested as a compilation warning (too many arguments
for format [-Wformat-extra-args]), potentially obscuring actual
runtime errors and complicating debugging processes.

This fix enhances the clarity of error messages during test failures
and ensures compliance with standard C format string conventions.

Signed-off-by: angquan yu <angquan21@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/breakpoints/step_after_suspend_test.c

index 2cf6f10ab7c4ac7f7e75078a7c0a9e8f23a2a7c5..b8703c499d28cd66cd8c01efa9a2c78b0de7198e 100644 (file)
@@ -89,7 +89,7 @@ int run_test(int cpu)
 
        wpid = waitpid(pid, &status, __WALL);
        if (wpid != pid) {
-               ksft_print_msg("waitpid() failed: $s\n", strerror(errno));
+               ksft_print_msg("waitpid() failed: %s\n", strerror(errno));
                return KSFT_FAIL;
        }
        if (WIFEXITED(status)) {