Re: [PATCH v2 31/53] selftests/mm: gup_longterm: add setup of HugeTLB pages

Mike Rapoport
2026-04-28T05:32:24Z

On Mon, Apr 27, 2026 at 04:10:23PM -0400, Luiz Capitulino wrote:
> On 2026-04-18 06:55, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> >
> > 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.
> >
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> > ---
> > 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 ab4eaf4feb7c..6e1de12bf28c 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));
>
> Are we missing a call to hugetlb_save_settings()?i

Yes, we are :)

> If yes, should we do it in hugetlb_setup()?

Yep, will add it there.

> > ksft_print_header();
>

--
Sincerely yours,
Mike.