On 2025/8/7 16:27, Wei Yang wrote:
Currently it hard coded the number of hugepage to check for check_huge_anon(), but we already have the number passed in.
Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by: Wei Yang richard.weiyang@gmail.com
Yes. LGTM. Reviewed-by: Baolin Wang baolin.wang@linux.alibaba.com
tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index 44a3f8a58806..bf40e6b121ab 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp unsigned long rss_anon_before, rss_anon_after; size_t i;
- if (!check_huge_anon(one_page, 4, pmd_pagesize))
- if (!check_huge_anon(one_page, nr_hpages, pmd_pagesize)) ksft_exit_fail_msg("No THP is allocated\n");
rss_anon_before = rss_anon();