* [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test
@ 2026-07-09 11:40 Christophe Leroy (CS GROUP)
2026-07-09 11:53 ` Andy Shevchenko
2026-07-09 17:31 ` Yury Norov
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-09 11:40 UTC (permalink / raw)
To: Andrew Morton, Yury Norov, Rasmus Villemoes, Andy Shevchenko
Cc: Christophe Leroy (CS GROUP), linux-kernel, linuxppc-dev,
Erhard Furtner
Erhard reports failure of bitmap tests on powerpc:
test_bitmap: loaded.
test_bitmap: [lib/test_bitmap.c:397] bitmaps contents differ: expected "1,3-4,9", got "1,3-4,9,65-71,73-79,81-87,89-95,97-99"
test_bitmap: parselist('0-2047:128/256'): 912
test_bitmap: scnprintf("%*pbl", '0-32767'): 5977
test_bitmap: test_bitmap_read_perf: 1191082
test_bitmap: test_bitmap_write_perf: 1270153
test_bitmap: failed 1 out of 208655 tests
The happens mainly when CONFIG_INIT_STACK_ALL_PATTERN is set.
Commit 6b5a4b687367 ("bitmap: Add test for out-of-boundary
modifications for scatter & gather") extended the test to
out-of-boundary bits, but those bits where left uninitialised.
Properly initialise the entire result bitmap before the test.
Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Closes: https://lore.kernel.org/all/ca3547ae-8b79-43a2-a758-23ec980bfd9a@mailbox.org
Fixes: 6b5a4b687367 ("bitmap: Add test for out-of-boundary modifications for scatter & gather")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
lib/test_bitmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 69813c10e6c0..448c3eb48a4a 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -392,6 +392,7 @@ static void __init test_bitmap_sg(void)
/* Scatter/gather relationship */
bitmap_zero(bmap_tmp, 100);
+ bitmap_zero(bmap_res, 100);
bitmap_gather(bmap_tmp, bmap_scatter, sg_mask, nbits);
bitmap_scatter(bmap_res, bmap_tmp, sg_mask, nbits);
expect_eq_bitmap(bmap_scatter, bmap_res, 100);
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test
2026-07-09 11:40 [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test Christophe Leroy (CS GROUP)
@ 2026-07-09 11:53 ` Andy Shevchenko
2026-07-09 17:31 ` Yury Norov
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-07-09 11:53 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, linux-kernel,
linuxppc-dev, Erhard Furtner
On Thu, Jul 09, 2026 at 01:40:06PM +0200, Christophe Leroy (CS GROUP) wrote:
> Erhard reports failure of bitmap tests on powerpc:
>
> test_bitmap: loaded.
> test_bitmap: [lib/test_bitmap.c:397] bitmaps contents differ: expected "1,3-4,9", got "1,3-4,9,65-71,73-79,81-87,89-95,97-99"
> test_bitmap: parselist('0-2047:128/256'): 912
> test_bitmap: scnprintf("%*pbl", '0-32767'): 5977
> test_bitmap: test_bitmap_read_perf: 1191082
> test_bitmap: test_bitmap_write_perf: 1270153
> test_bitmap: failed 1 out of 208655 tests
>
> The happens mainly when CONFIG_INIT_STACK_ALL_PATTERN is set.
>
> Commit 6b5a4b687367 ("bitmap: Add test for out-of-boundary
> modifications for scatter & gather") extended the test to
> out-of-boundary bits, but those bits where left uninitialised.
>
> Properly initialise the entire result bitmap before the test.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test
2026-07-09 11:40 [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test Christophe Leroy (CS GROUP)
2026-07-09 11:53 ` Andy Shevchenko
@ 2026-07-09 17:31 ` Yury Norov
1 sibling, 0 replies; 3+ messages in thread
From: Yury Norov @ 2026-07-09 17:31 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Andy Shevchenko,
linux-kernel, linuxppc-dev, Erhard Furtner
On Thu, Jul 09, 2026 at 01:40:06PM +0200, Christophe Leroy (CS GROUP) wrote:
> Erhard reports failure of bitmap tests on powerpc:
>
> test_bitmap: loaded.
> test_bitmap: [lib/test_bitmap.c:397] bitmaps contents differ: expected "1,3-4,9", got "1,3-4,9,65-71,73-79,81-87,89-95,97-99"
> test_bitmap: parselist('0-2047:128/256'): 912
> test_bitmap: scnprintf("%*pbl", '0-32767'): 5977
> test_bitmap: test_bitmap_read_perf: 1191082
> test_bitmap: test_bitmap_write_perf: 1270153
> test_bitmap: failed 1 out of 208655 tests
>
> The happens mainly when CONFIG_INIT_STACK_ALL_PATTERN is set.
>
> Commit 6b5a4b687367 ("bitmap: Add test for out-of-boundary
> modifications for scatter & gather") extended the test to
> out-of-boundary bits, but those bits where left uninitialised.
>
> Properly initialise the entire result bitmap before the test.
>
> Reported-by: Erhard Furtner <erhard_f@mailbox.org>
> Closes: https://lore.kernel.org/all/ca3547ae-8b79-43a2-a758-23ec980bfd9a@mailbox.org
> Fixes: 6b5a4b687367 ("bitmap: Add test for out-of-boundary modifications for scatter & gather")
> Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Applied, thanks!
> ---
> lib/test_bitmap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
> index 69813c10e6c0..448c3eb48a4a 100644
> --- a/lib/test_bitmap.c
> +++ b/lib/test_bitmap.c
> @@ -392,6 +392,7 @@ static void __init test_bitmap_sg(void)
>
> /* Scatter/gather relationship */
> bitmap_zero(bmap_tmp, 100);
> + bitmap_zero(bmap_res, 100);
> bitmap_gather(bmap_tmp, bmap_scatter, sg_mask, nbits);
> bitmap_scatter(bmap_res, bmap_tmp, sg_mask, nbits);
> expect_eq_bitmap(bmap_scatter, bmap_res, 100);
> --
> 2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-09 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 11:40 [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test Christophe Leroy (CS GROUP)
2026-07-09 11:53 ` Andy Shevchenko
2026-07-09 17:31 ` Yury Norov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox