selftests:modify the incorrect print format
when the argument type is 'unsigned int',printf '%u' in format string. Problem found during code reading. Update commit log with information on how the problem was found: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: zhujun2 <zhujun2@cmss.chinamobile.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
3f6f8a8c5e
commit
ecc4185a4d
@ -132,7 +132,7 @@ static inline void ksft_print_header(void)
|
||||
static inline void ksft_set_plan(unsigned int plan)
|
||||
{
|
||||
ksft_plan = plan;
|
||||
printf("1..%d\n", ksft_plan);
|
||||
printf("1..%u\n", ksft_plan);
|
||||
}
|
||||
|
||||
static inline void ksft_print_cnts(void)
|
||||
@ -140,7 +140,7 @@ static inline void ksft_print_cnts(void)
|
||||
if (ksft_plan != ksft_test_num())
|
||||
printf("# Planned tests != run tests (%u != %u)\n",
|
||||
ksft_plan, ksft_test_num());
|
||||
printf("# Totals: pass:%d fail:%d xfail:%d xpass:%d skip:%d error:%d\n",
|
||||
printf("# Totals: pass:%u fail:%u xfail:%u xpass:%u skip:%u error:%u\n",
|
||||
ksft_cnt.ksft_pass, ksft_cnt.ksft_fail,
|
||||
ksft_cnt.ksft_xfail, ksft_cnt.ksft_xpass,
|
||||
ksft_cnt.ksft_xskip, ksft_cnt.ksft_error);
|
||||
@ -179,7 +179,7 @@ static inline __printf(1, 2) void ksft_test_result_pass(const char *msg, ...)
|
||||
ksft_cnt.ksft_pass++;
|
||||
|
||||
va_start(args, msg);
|
||||
printf("ok %d ", ksft_test_num());
|
||||
printf("ok %u ", ksft_test_num());
|
||||
errno = saved_errno;
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
@ -193,7 +193,7 @@ static inline __printf(1, 2) void ksft_test_result_fail(const char *msg, ...)
|
||||
ksft_cnt.ksft_fail++;
|
||||
|
||||
va_start(args, msg);
|
||||
printf("not ok %d ", ksft_test_num());
|
||||
printf("not ok %u ", ksft_test_num());
|
||||
errno = saved_errno;
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
@ -219,7 +219,7 @@ static inline __printf(1, 2) void ksft_test_result_xfail(const char *msg, ...)
|
||||
ksft_cnt.ksft_xfail++;
|
||||
|
||||
va_start(args, msg);
|
||||
printf("ok %d # XFAIL ", ksft_test_num());
|
||||
printf("ok %u # XFAIL ", ksft_test_num());
|
||||
errno = saved_errno;
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
@ -233,7 +233,7 @@ static inline __printf(1, 2) void ksft_test_result_skip(const char *msg, ...)
|
||||
ksft_cnt.ksft_xskip++;
|
||||
|
||||
va_start(args, msg);
|
||||
printf("ok %d # SKIP ", ksft_test_num());
|
||||
printf("ok %u # SKIP ", ksft_test_num());
|
||||
errno = saved_errno;
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
@ -248,7 +248,7 @@ static inline __printf(1, 2) void ksft_test_result_error(const char *msg, ...)
|
||||
ksft_cnt.ksft_error++;
|
||||
|
||||
va_start(args, msg);
|
||||
printf("not ok %d # error ", ksft_test_num());
|
||||
printf("not ok %u # error ", ksft_test_num());
|
||||
errno = saved_errno;
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user