diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-05-11 19:28:28 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-05-28 21:31:52 -0700 |
| commit | 043afdb8e90da5bd73ff3de118814576603ebf5a (patch) | |
| tree | bbb215dcfbf8b1efbb1c4dede75282521634d980 /tools | |
| parent | 9dce4ebd2a4b0a1460a32d4d429d2a9e33c48eee (diff) | |
| download | linux-next-history-043afdb8e90da5bd73ff3de118814576603ebf5a.tar.gz | |
selftests/mm: hugetlb-vmemmap: add setup of HugeTLB pages
hugetlb-vmemmap test fails 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.
Link: https://lore.kernel.org/20260511162840.375890-45-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Tested-by: Luiz Capitulino <luizcap@redhat.com>
Tested-by: Sarthak Sharma <sarthak.sharma@arm.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Donet Tom <donettom@linux.ibm.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Liam Howlett <liam@infradead.org>
Cc: Li Wang <li.wang@linux.dev>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nico Pache <npache@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/mm/hugetlb-vmemmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/mm/hugetlb-vmemmap.c b/tools/testing/selftests/mm/hugetlb-vmemmap.c index af5786bebfd1d..507df78a158d8 100644 --- a/tools/testing/selftests/mm/hugetlb-vmemmap.c +++ b/tools/testing/selftests/mm/hugetlb-vmemmap.c @@ -97,6 +97,9 @@ int main(int argc, char **argv) ksft_print_header(); ksft_set_plan(1); + if (!hugetlb_setup_default(1)) + ksft_exit_skip("Not enough free huge pages\n"); + pagesize = psize(); maplength = default_huge_page_size(); if (!maplength) |
