mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests:Fix printf format string in kselftest_harness.h
@ 2024-07-10  3:28 Zhu Jun
  2024-07-10 21:01 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2024-07-10  3:28 UTC (permalink / raw)
  To: shuah; +Cc: kees, luto, wad, linux-kselftest, linux-kernel, zhujun2

'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int'.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 tools/testing/selftests/kselftest_harness.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index b634969cbb6f..dbbbcc6c04ee 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -1084,7 +1084,7 @@ void __wait_for_test(struct __test_metadata *t)
 		}
 	} else {
 		fprintf(TH_LOG_STREAM,
-			"# %s: Test ended in some other way [%u]\n",
+			"# %s: Test ended in some other way [%d]\n",
 			t->name,
 			status);
 	}
-- 
2.17.1




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

* Re: [PATCH] selftests:Fix printf format string in kselftest_harness.h
  2024-07-10  3:28 [PATCH] selftests:Fix printf format string in kselftest_harness.h Zhu Jun
@ 2024-07-10 21:01 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-07-10 21:01 UTC (permalink / raw)
  To: Zhu Jun, shuah; +Cc: kees, luto, wad, linux-kselftest, linux-kernel, Shuah Khan

On 7/9/24 21:28, Zhu Jun wrote:
> '%u' in format string requires 'unsigned int' in __wait_for_test()
> but the argument type is 'signed int'.
> 
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
>   tools/testing/selftests/kselftest_harness.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> index b634969cbb6f..dbbbcc6c04ee 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -1084,7 +1084,7 @@ void __wait_for_test(struct __test_metadata *t)
>   		}
>   	} else {
>   		fprintf(TH_LOG_STREAM,
> -			"# %s: Test ended in some other way [%u]\n",
> +			"# %s: Test ended in some other way [%d]\n",
>   			t->name,
>   			status);
>   	}

The change is fine. I do want to see you find the problem in the
changelog.

thanks,
-- Shuah


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

end of thread, other threads:[~2024-07-10 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-10  3:28 [PATCH] selftests:Fix printf format string in kselftest_harness.h Zhu Jun
2024-07-10 21:01 ` Shuah Khan

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

all inboxes | Powered by JetHome®