summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Norov <ynorov@nvidia.com>2026-02-19 13:13:58 -0500
committerYury Norov <ynorov@nvidia.com>2026-03-23 13:33:51 -0400
commite63375d39a2e90edc25e96560f14d28193347b04 (patch)
treeedca457b7dcb3c99f2b0e5d43fd08078fd2ab491
parentd1a43793c484e4f1e896dd2fee52b034f8c4f965 (diff)
downloadlinux-next-e63375d39a2e90edc25e96560f14d28193347b04.tar.gz
linux-next-e63375d39a2e90edc25e96560f14d28193347b04.zip
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>
-rw-r--r--lib/test_bitmap.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 8d07b5411897..1c352c1edfa5 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -524,8 +524,7 @@ static void __init test_bitmap_parselist(void)
}
if (ptest.flags & PARSE_TIME)
- pr_info("parselist: %d: input is '%s' OK, Time: %llu\n",
- i, ptest.in, time);
+ pr_info("parselist('%s'):\t%llu\n", ptest.in, time);
#undef ptest
}
@@ -552,18 +551,18 @@ static void __init test_bitmap_printlist(void)
time = ktime_get() - time;
if (ret != slen) {
- pr_err("bitmap_printlist: result is %d, expected %d\n", ret, slen);
+ pr_err("scnprintf(\"%%*pbl\"): result is %d, expected %d\n", ret, slen);
failed_tests++;
goto out;
}
if (strncmp(buf, expected, slen)) {
- pr_err("bitmap_printlist: result is %s, expected %s\n", buf, expected);
+ pr_err("scnprintf(\"%%*pbl\"): result is %s, expected %s\n", buf, expected);
failed_tests++;
goto out;
}
- pr_info("bitmap_printlist: input is '%s', Time: %llu\n", buf, time);
+ pr_info("scnprintf(\"%%*pbl\", '%s'):\t%llu\n", buf, time);
out:
kfree(buf);
kfree(bmap);
@@ -1399,7 +1398,7 @@ static void __init test_bitmap_read_perf(void)
}
}
time = ktime_get() - time;
- pr_info("Time spent in %s:\t%llu\n", __func__, time);
+ pr_info("%s:\t\t%llu\n", __func__, time);
}
static void __init test_bitmap_write_perf(void)
@@ -1421,7 +1420,7 @@ static void __init test_bitmap_write_perf(void)
}
}
time = ktime_get() - time;
- pr_info("Time spent in %s:\t%llu\n", __func__, time);
+ pr_info("%s:\t\t%llu\n", __func__, time);
}
#undef TEST_BIT_LEN