[PATCH v4 01/19] selftests/mm: raise the khugepaged test-case cap
From: Kiryl Shutsemau
Date: Fri Aug 14 2026 - 22:01:12 EST
From: "Kiryl Shutsemau (Meta)" <kas@xxxxxxxxxx>
TEST() ends the run with "MAX_TEST_CASES is too small" when the table
fills, and the table holds 64. A full invocation already registers 63, so
the next case added anywhere aborts the whole suite before a single test
runs.
Raise the cap to 256. The table is a static array of small structs, so the
room costs nothing worth counting.
Assisted-by: Claude-Code:claude-opus-5
Acked-by: Usama Arif <usama.arif@xxxxxxxxx>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Signed-off-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
---
tools/testing/selftests/mm/khugepaged.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index d3a53673e1f9..6cfec2b940ac 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -1290,7 +1290,7 @@ struct test_case {
test_fn fn;
};
-#define MAX_TEST_CASES 64
+#define MAX_TEST_CASES 256
static struct test_case test_cases[MAX_TEST_CASES];
static int nr_test_cases;
--
2.54.0