[PATCH v5 01/19] selftests/mm: raise the khugepaged test-case cap

From: Kiryl Shutsemau

Date: Tue Sep 08 2026 - 09:09:10 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: LLM
Acked-by: Usama Arif <usama.arif@xxxxxxxxx>
Acked-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
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 f82673f5f6b4..e57016bd96fb 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -1285,7 +1285,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