[PATCH v2 4/6] bitmap: test bitmap_parselist() with text after the group size
From: Shashank Mohan Jain
Date: Fri Sep 25 2026 - 21:28:02 EST
Add bitmap_parselist() cases where 'N' or 'all' directly follows the
group size of a "range:used/group" region. These were accepted before
"bitmap: bitmap_parselist(): reject trailing characters after group
size" and must return -EINVAL.
Assisted-by: LLM
Signed-off-by: Shashank Mohan Jain <jain.sm@xxxxxxxxx>
---
lib/test_bitmap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 35bb18f6e326..f316a82840f5 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -528,6 +528,9 @@ static const struct test_bitmap_parselist parselist_tests[] __initconst = {
{-EINVAL, "a-31:10/1", NULL, 8, 0},
{-EINVAL, "0-31:a/1", NULL, 8, 0},
{-EINVAL, "0-\n", NULL, 8, 0},
+ {-EINVAL, "0-7:1/2N", NULL, 8, 0},
+ {-EINVAL, "0-7:1/2all", NULL, 8, 0},
+ {-EINVAL, "all:1/2N", NULL, 8, 0},
};
--
2.43.0