selftests: vm: add /dev/userfaultfd test cases to run_vmtests.sh
This new mode was recently added to the userfaultfd selftest. We want to exercise both userfaultfd(2) as well as /dev/userfaultfd, so add both test cases to the script. Link: https://lkml.kernel.org/r/20220808175614.3885028-6-axelrasmussen@google.com Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Peter Xu <peterx@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Dmitry V. Levin <ldv@altlinux.org> Cc: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> Cc: Hugh Dickins <hughd@google.com> Cc: Jan Kara <jack@suse.cz> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nadav Amit <namit@vmware.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Zhang Yi <yi.zhang@huawei.com> Cc: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
816284a3d0
commit
4a7e922587
|
@ -120,13 +120,16 @@ run_test ./gup_test -a
|
|||
# Dump pages 0, 19, and 4096, using pin_user_pages:
|
||||
run_test ./gup_test -ct -F 0x1 0 19 0x1000
|
||||
|
||||
run_test ./userfaultfd anon 20 16
|
||||
# Hugetlb tests require source and destination huge pages. Pass in half the
|
||||
# size ($half_ufd_size_MB), which is used for *each*.
|
||||
run_test ./userfaultfd hugetlb "$half_ufd_size_MB" 32
|
||||
run_test ./userfaultfd hugetlb_shared "$half_ufd_size_MB" 32 "$mnt"/uffd-test
|
||||
rm -f "$mnt"/uffd-test
|
||||
run_test ./userfaultfd shmem 20 16
|
||||
uffd_mods=("" ":dev")
|
||||
for mod in "${uffd_mods[@]}"; do
|
||||
run_test ./userfaultfd anon${mod} 20 16
|
||||
# Hugetlb tests require source and destination huge pages. Pass in half
|
||||
# the size ($half_ufd_size_MB), which is used for *each*.
|
||||
run_test ./userfaultfd hugetlb${mod} "$half_ufd_size_MB" 32
|
||||
run_test ./userfaultfd hugetlb_shared${mod} "$half_ufd_size_MB" 32 "$mnt"/uffd-test
|
||||
rm -f "$mnt"/uffd-test
|
||||
run_test ./userfaultfd shmem${mod} 20 16
|
||||
done
|
||||
|
||||
#cleanup
|
||||
umount "$mnt"
|
||||
|
|
Loading…
Reference in New Issue