Re: [PATCH] selftests: kselftest: Fix debug message formatting

From: Shuah Khan

Date: Sat Sep 26 2026 - 15:28:25 EST


On 9/22/26 14:06, André Almeida wrote:
Em 16/09/2026 16:04, ZhuangZhuang Wang escreveu:
ksft_print_dbg_msg() passes a va_list to ksft_print_msg() as a regular
variadic argument. As a result, format specifiers consume the va_list
representation instead of the caller's arguments and print garbage.

Add a va_list-based helper and use it from both message printing
functions. Also annotate ksft_print_dbg_msg() so the compiler can check
its format arguments.

Fixes: f2662ec26b26 ("selftests: kselftest: Create ksft_print_dbg_msg()")

Does it really fix this commit? I don't see that is the case. Please don't
add fixes tag unless it fixes the problem in the commit.

Signed-off-by: ZhuangZhuang Wang <wzz_123123@xxxxxxx>

Reviewed-by: André Almeida <andrealmeid@xxxxxxxxxx>

Also can you tell me how this problem was found and what;s the output
before and after this change?

thanks,
-- Shuah