diff options
author | Peter Xu <[email protected]> | 2023-04-12 12:42:34 -0400 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-04-18 16:30:04 -0700 |
commit | 4af9ff29816ac011af143c9d5cd16ab75429a600 (patch) | |
tree | bfcc6a2fca65a730c3fea462663fe2e459635b18 | |
parent | 366e93c46576e77f1ccfdeab31127f40537e7484 (diff) |
selftests/mm: test UFFDIO_ZEROPAGE only when !hugetlb
Make the check as simple as "test_type == TEST_HUGETLB" because that's the
only mem that doesn't support ZEROPAGE.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Axel Rasmussen <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Dmitry Safonov <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Mike Rapoport (IBM) <[email protected]>
Cc: Zach O'Keefe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | tools/testing/selftests/mm/userfaultfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/userfaultfd.c b/tools/testing/selftests/mm/userfaultfd.c index 795fbc4d84f8..d724f1c78847 100644 --- a/tools/testing/selftests/mm/userfaultfd.c +++ b/tools/testing/selftests/mm/userfaultfd.c @@ -1118,7 +1118,7 @@ static int __uffdio_zeropage(int ufd, unsigned long offset, bool retry) { struct uffdio_zeropage uffdio_zeropage; int ret; - bool has_zeropage = get_expected_ioctls(0) & (1 << _UFFDIO_ZEROPAGE); + bool has_zeropage = !(test_type == TEST_HUGETLB); __s64 res; if (offset >= nr_pages * page_size) |