[PATCH v4 33/55] selftests/mm: gup_longterm: add setup of HugeTLB pages
From: Mike Rapoport
Date: Mon May 11 2026 - 13:06:37 EST
From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
gup_longterm tests skips HugeTLB tests if there are no free huge pages
prepared by a wrapper script.
Add setup of HugeTLB pages to the test and make sure that the original
settings are restored on the test exit.
Tested-by: Luiz Capitulino <luizcap@xxxxxxxxxx>
Tested-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
tools/testing/selftests/mm/gup_longterm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c
index 96dae0acd11a..eb8963e9d98f 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -510,7 +510,7 @@ int main(int argc, char **argv)
int i;
pagesize = getpagesize();
- nr_hugetlbsizes = detect_hugetlb_page_sizes(hugetlbsizes,
+ nr_hugetlbsizes = hugetlb_setup(2, hugetlbsizes,
ARRAY_SIZE(hugetlbsizes));
ksft_print_header();
--
2.53.0