Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests: kselftest: Fix the wrong format specifier
@ 2024-12-02  4:31 zhangjiao2
  2024-12-17 16:30 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: zhangjiao2 @ 2024-12-02  4:31 UTC (permalink / raw)
  To: shuah; +Cc: linux-kselftest, linux-kernel, zhang jiao

From: zhang jiao <zhangjiao2@cmss.chinamobile.com>

The format specifier of "unsigned int" in printf()
should be "%u", not "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
---
 tools/testing/selftests/kselftest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 29fedf609611..062c02a7be2d 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -403,7 +403,7 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ...
 	 */
 	if (ksft_plan || ksft_test_num()) {
 		ksft_cnt.ksft_xskip++;
-		printf("ok %d # SKIP ", 1 + ksft_test_num());
+		printf("ok %u # SKIP ", 1 + ksft_test_num());
 	} else {
 		printf("1..0 # SKIP ");
 	}
-- 
2.33.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] selftests: kselftest: Fix the wrong format specifier
  2024-12-02  4:31 [PATCH] selftests: kselftest: Fix the wrong format specifier zhangjiao2
@ 2024-12-17 16:30 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-12-17 16:30 UTC (permalink / raw)
  To: zhangjiao2, shuah; +Cc: linux-kselftest, linux-kernel

On 12/1/24 21:31, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> 
> The format specifier of "unsigned int" in printf()
> should be "%u", not "%d".
> 
> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> ---
>   tools/testing/selftests/kselftest.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
> index 29fedf609611..062c02a7be2d 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -403,7 +403,7 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ...
>   	 */
>   	if (ksft_plan || ksft_test_num()) {
>   		ksft_cnt.ksft_xskip++;
> -		printf("ok %d # SKIP ", 1 + ksft_test_num());
> +		printf("ok %u # SKIP ", 1 + ksft_test_num());
>   	} else {
>   		printf("1..0 # SKIP ");
>   	}

Applied to linux-kselftest next for Linux 6.14-rc1

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-17 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02  4:31 [PATCH] selftests: kselftest: Fix the wrong format specifier zhangjiao2
2024-12-17 16:30 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox