On 4/29/26 2:12 AM, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" <[email protected]> > > 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) <[email protected]> I have run the test before and after applying the patch. Before the patch, many tests were skipped with the message "need more free huge pages". After the patch, these tests passed successfully. Tested-by: Sarthak Sharma <[email protected]> > --- > 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)); > > ksft_print_header();
- [PATCH v3 10/54] selftests/mm: hugetlb-madvise: use kselfte... Mike Rapoport
- [PATCH v3 24/54] selftests/mm: hugepage_settings: use unsig... Mike Rapoport
- Re: [PATCH v3 24/54] selftests/mm: hugepage_settings: ... Sarthak Sharma
- [PATCH v3 26/54] selftests/mm: hugepage_settings: rename ge... Mike Rapoport
- Re: [PATCH v3 26/54] selftests/mm: hugepage_settings: ... Sarthak Sharma
- [PATCH v3 13/54] selftests/mm: khugepaged: group tests in a... Mike Rapoport
- [PATCH v3 17/54] selftests/mm: protection_keys: use kselfte... Mike Rapoport
- Re: [PATCH v3 17/54] selftests/mm: protection_keys: us... Sarthak Sharma
- [PATCH v3 16/54] selftests/mm: protection_keys: use descrip... Mike Rapoport
- [PATCH v3 32/54] selftests/mm: gup_longterm: add setup of H... Mike Rapoport
- Re: [PATCH v3 32/54] selftests/mm: gup_longterm: add s... Sarthak Sharma
- [PATCH v3 21/54] selftests/mm: add atexit() and signal hand... Mike Rapoport
- Re: [PATCH v3 21/54] selftests/mm: add atexit() and si... Sarthak Sharma
- [PATCH v3 33/54] selftests/mm: gup_test: add setup of HugeT... Mike Rapoport
- Re: [PATCH v3 33/54] selftests/mm: gup_test: add setup... Sarthak Sharma
- [PATCH v3 34/54] selftests/mm: hmm-tests: add setup of Huge... Mike Rapoport
- Re: [PATCH v3 34/54] selftests/mm: hmm-tests: add setu... Sarthak Sharma
- [PATCH v3 23/54] selftests/mm: move HugeTLB helpers to huge... Mike Rapoport
- Re: [PATCH v3 23/54] selftests/mm: move HugeTLB helper... Sarthak Sharma
- [PATCH v3 19/54] selftests/mm: uffd-unit-tests: use kselfte... Mike Rapoport
- Re: [PATCH v3 19/54] selftests/mm: uffd-unit-tests: us... Sarthak Sharma

