selftests/mm: skip uffd hugetlb tests with insufficient hugepages
authorNico Pache <npache@redhat.com>
Wed, 6 Mar 2024 22:37:13 +0000 (15:37 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Mar 2024 20:07:18 +0000 (13:07 -0700)
commit5a6aa60d18236c2f8ebc438db3e80e61714a8904
treec3f57e81daac403ff3f814960a801f09a210ca78
parent2fd570c1d802e7d1b7df2fbc3784875686427f78
selftests/mm: skip uffd hugetlb tests with insufficient hugepages

Now that run_vmtests.sh does not guarantee that the correct hugepage count
is available, add a check inside the userfaultfd hugetlb test to verify
the nr_hugepages count before continuing.

Link: https://lkml.kernel.org/r/20240306223714.320681-3-npache@redhat.com
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-stress.c