diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/
tools/testing/selftests/mm/split_huge_page_test.c
index eadbeb820d71..7cbeaebc9d71 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -523,6 +523,9 @@ int main(int argc, char **argv) const char *fs_loc; bool created_tmp; int offset; + unsigned int max_order; + unsigned int nr_pages; + unsigned int tests;
ksft_print_header();
@@ -534,35 +537,38 @@ int main(int argc, char **argv) if (argc > 1) optional_xfs_path = argv[1];
- ksft_set_plan(1+8+1+9+9+8*4+2);
pagesize = getpagesize(); pageshift = ffs(pagesize) - 1; pmd_pagesize = read_pmd_pagesize(); if (!pmd_pagesize) ksft_exit_fail_msg("Reading PMD pagesize failed\n");
+ nr_pages = pmd_pagesize / pagesize; + max_order = sz2ord(pmd_pagesize);
^ extra space here
+ tests = 2 + (max_order - 1) + (2 * max_order) + (max_order -
- 4 + 2;
Is it possible to have some defines here instead plain numbers? Thanks
I assume we should look into using kselftest_harness as a separate effort, so we can avoid this manual test calculation completely. I'm afraid even using defines will not make this significntly more readable.
On Sun, Aug 17, 2025 at 10:07:01AM +0200, David Hildenbrand wrote: [...]
Is it possible to have some defines here instead plain numbers? Thanks
I assume we should look into using kselftest_harness as a separate effort, so we can avoid this manual test calculation completely. I'm afraid even using defines will not make this significntly more readable.
Agree
-- Cheers
David / dhildenb
linux-kselftest-mirror@lists.linaro.org