From: Yury Norov <ynorov@nvidia.com>
To: linux-kernel@vger.kernel.org,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Andrew Morton <akpm@linux-foundation.org>,
Antoine Tenart <atenart@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Eric Dumazet <edumazet@google.com>,
Geetha sowjanya <gakula@marvell.com>,
Ingo Molnar <mingo@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
James Clark <james.clark@linaro.org>,
Jerin Jacob <jerinj@marvell.com>,
Linu Cherian <lcherian@marvell.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Mike Leach <mike.leach@linaro.org>,
Moritz Fischer <mdf@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Simon Horman <horms@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Subbaraya Sundeep <sbhatta@marvell.com>,
Sunil Goutham <sgoutham@marvell.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Tom Rix <trix@redhat.com>, Xu Yilun <yilun.xu@intel.com>,
Yajun Deng <yajun.deng@linux.dev>,
Yury Norov <yury.norov@gmail.com>,
Zhang Rui <rui.zhang@intel.com>, hariprasad <hkelam@marvell.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-fpga@vger.kernel.org, linux-pm@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org
Cc: Yury Norov <ynorov@nvidia.com>
Subject: [PATCH 06/12] bitmap: align test_bitmap output
Date: Thu, 19 Feb 2026 13:13:58 -0500 [thread overview]
Message-ID: <20260219181407.290201-7-ynorov@nvidia.com> (raw)
In-Reply-To: <20260219181407.290201-1-ynorov@nvidia.com>
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>
---
lib/test_bitmap.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 2d9b71ad455c..2eed21bf4346 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -520,8 +520,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
}
@@ -548,18 +547,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);
@@ -1395,7 +1394,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)
@@ -1417,7 +1416,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
--
2.43.0
next prev parent reply other threads:[~2026-02-19 18:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 18:13 [PATCH 00/12] cleanup bitmaps printing in sysfs Yury Norov
2026-02-19 18:13 ` [PATCH 01/12] powerpc/xive: simplify xive_spapr_debug_show() Yury Norov
2026-02-23 13:13 ` Shrikanth Hegde
2026-02-19 18:13 ` [PATCH 02/12] octeontx2-af: siplify rvu_debugfs Yury Norov
2026-02-19 18:13 ` [PATCH 03/12] thermal: intel: switch cpumask_get() to using cpumask_print_to_pagebuf() Yury Norov
2026-02-19 18:13 ` [PATCH 04/12] lib/prime_numbers: drop temporary buffer in dump_primes() Yury Norov
2026-02-19 18:13 ` [PATCH 05/12] bitmap: switch test to scnprintf("%*pbl") Yury Norov
2026-02-19 18:13 ` Yury Norov [this message]
2026-02-19 18:13 ` [PATCH 07/12] mm: add rest_of_page() macro Yury Norov
2026-02-19 18:14 ` [PATCH 08/12] coresight: don't use bitmap_print_to_pagebuf() Yury Norov
2026-02-19 18:42 ` Thomas Weißschuh
2026-02-19 18:14 ` [PATCH 09/12] fpga: m10bmc-sec: switch show_canceled_csk() to using scnprintf() Yury Norov
2026-02-19 23:43 ` Russ Weight
2026-02-26 7:39 ` Xu Yilun
2026-02-19 18:14 ` [PATCH 10/12] net-sysfs: switch xps_queue_show() " Yury Norov
2026-02-19 18:14 ` [PATCH 11/12] cpumask: switch cpumap_print_to_pagebuf() " Yury Norov
2026-02-19 18:14 ` [PATCH 12/12] bitmap: drop bitmap_print_to_pagebuf() Yury Norov
2026-02-19 19:41 ` [PATCH 00/12] cleanup bitmaps printing in sysfs Jakub Kicinski
2026-03-03 18:17 ` Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260219181407.290201-7-ynorov@nvidia.com \
--to=ynorov@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=atenart@kernel.org \
--cc=brauner@kernel.org \
--cc=chleroy@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=james.clark@linaro.org \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukasz.luba@arm.com \
--cc=maddy@linux.ibm.com \
--cc=mdf@kernel.org \
--cc=mike.leach@linaro.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sbhatta@marvell.com \
--cc=sdf@fomichev.me \
--cc=sgoutham@marvell.com \
--cc=suzuki.poulose@arm.com \
--cc=trix@redhat.com \
--cc=yajun.deng@linux.dev \
--cc=yilun.xu@intel.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox