Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bitmap: align test_bitmap output

Different subtests print output in slightly different formats. Unify the
format for better visual representation.

The test output before:

[ 0.553474] test_bitmap: parselist: 14: input is '0-2047:128/256' OK, Time: 202
[ 0.555121] test_bitmap: bitmap_print_to_pagebuf: input is '0-32767
[ 0.555121] ', Time: 1278
[ 0.578392] test_bitmap: Time spent in test_bitmap_read_perf: 427864
[ 0.580137] test_bitmap: Time spent in test_bitmap_write_perf: 793554
[ 0.581957] test_bitmap: all 390447 tests passed

And after:

[ 0.314982] test_bitmap: parselist('0-2047:128/256'): 135
[ 0.315517] test_bitmap: scnprintf("%*pbl", '0-32767'): 342
[ 0.330045] test_bitmap: test_bitmap_read_perf: 252294
[ 0.331132] test_bitmap: test_bitmap_write_perf: 539001
[ 0.332163] test_bitmap: all 390447 tests passed

Signed-off-by: Yury Norov <ynorov@nvidia.com>

+6 -7
+6 -7
lib/test_bitmap.c
··· 524 524 } 525 525 526 526 if (ptest.flags & PARSE_TIME) 527 - pr_info("parselist: %d: input is '%s' OK, Time: %llu\n", 528 - i, ptest.in, time); 527 + pr_info("parselist('%s'):\t%llu\n", ptest.in, time); 529 528 530 529 #undef ptest 531 530 } ··· 551 552 time = ktime_get() - time; 552 553 553 554 if (ret != slen) { 554 - pr_err("bitmap_printlist: result is %d, expected %d\n", ret, slen); 555 + pr_err("scnprintf(\"%%*pbl\"): result is %d, expected %d\n", ret, slen); 555 556 failed_tests++; 556 557 goto out; 557 558 } 558 559 559 560 if (strncmp(buf, expected, slen)) { 560 - pr_err("bitmap_printlist: result is %s, expected %s\n", buf, expected); 561 + pr_err("scnprintf(\"%%*pbl\"): result is %s, expected %s\n", buf, expected); 561 562 failed_tests++; 562 563 goto out; 563 564 } 564 565 565 - pr_info("bitmap_printlist: input is '%s', Time: %llu\n", buf, time); 566 + pr_info("scnprintf(\"%%*pbl\", '%s'):\t%llu\n", buf, time); 566 567 out: 567 568 kfree(buf); 568 569 kfree(bmap); ··· 1398 1399 } 1399 1400 } 1400 1401 time = ktime_get() - time; 1401 - pr_info("Time spent in %s:\t%llu\n", __func__, time); 1402 + pr_info("%s:\t\t%llu\n", __func__, time); 1402 1403 } 1403 1404 1404 1405 static void __init test_bitmap_write_perf(void) ··· 1420 1421 } 1421 1422 } 1422 1423 time = ktime_get() - time; 1423 - pr_info("Time spent in %s:\t%llu\n", __func__, time); 1424 + pr_info("%s:\t\t%llu\n", __func__, time); 1424 1425 } 1425 1426 1426 1427 #undef TEST_BIT_LEN