[PATCH v3 01/18] selftests/mm: raise the khugepaged test-case cap
From: Kiryl Shutsemau
Date: Wed Aug 12 2026 - 09:28:35 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 -- every context crossed
with every memory type, which needs a directory for the file and shmem ones
-- already registers 63, so the next case added anywhere aborts the whole
suite before a single test runs.
Raise it to 256. The table is a static array of small structs, so the room
costs nothing worth counting, and the cases added after this have somewhere
to go.
Assisted-by: Claude-Code:claude-opus-5
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 0d6c71ed2fae..018b0698229c 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -1324,7 +1324,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