linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/mm: do check_huge_anon() with a number been passed in
@ 2025-08-07  8:27 Wei Yang
  2025-08-07  9:26 ` Baolin Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Wei Yang @ 2025-08-07  8:27 UTC (permalink / raw)
  To: akpm, david, lorenzo.stoakes, ziy, dev.jain
  Cc: linux-mm, linux-kselftest, Wei Yang

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>
---
 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();
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-08-11  0:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07  8:27 [PATCH] selftests/mm: do check_huge_anon() with a number been passed in Wei Yang
2025-08-07  9:26 ` Baolin Wang
2025-08-07  9:34 ` Donet Tom
2025-08-07 10:26 ` David Hildenbrand
2025-08-08  1:30 ` wang lian
2025-08-08 15:56 ` Zi Yan
2025-08-08 15:59   ` Zi Yan
2025-08-08 16:01     ` Zi Yan
2025-08-09  0:46       ` Andrew Morton
2025-08-09 18:35       ` Wei Yang
2025-08-10 14:04       ` Lorenzo Stoakes
2025-08-11  0:51         ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).