diff mbox series

selftests:Fix printf format string in kselftest_harness.h

Message ID 20240710032813.3782-1-zhujun2@cmss.chinamobile.com (mailing list archive)
State Changes Requested
Headers show
Series selftests:Fix printf format string in kselftest_harness.h | expand

Commit Message

Zhu Jun July 10, 2024, 3:28 a.m. UTC
'%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(-)

Comments

Shuah Khan July 10, 2024, 9:01 p.m. UTC | #1
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
diff mbox series

Patch

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);
 	}