aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/vm/run_vmtests
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.vnet.ibm.com>2017-02-22 15:43:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 16:41:29 -0800
commit419624daf0e827452837177c4b983dc0f1b6429f (patch)
tree9785e74b08bc9aea0371787d5287f81c96685756 /tools/testing/selftests/vm/run_vmtests
parentuserfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings (diff)
downloadlinux-dev-419624daf0e827452837177c4b983dc0f1b6429f.tar.xz
linux-dev-419624daf0e827452837177c4b983dc0f1b6429f.zip
userfaultfd: shmem: add userfaultfd_shmem test
The test verifies that anonymous shared mapping can be used with userfault using the existing testing method. The shared memory area is allocated using mmap(..., MAP_SHARED | MAP_ANONYMOUS, ...) and released using madvise(MADV_REMOVE) Link: http://lkml.kernel.org/r/20161216144821.5183-35-aarcange@redhat.com Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Michael Rapoport <RAPOPORT@il.ibm.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/vm/run_vmtests')
-rwxr-xr-xtools/testing/selftests/vm/run_vmtests11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests
index 14d697ee00c4..c92f6cf31d0a 100755
--- a/tools/testing/selftests/vm/run_vmtests
+++ b/tools/testing/selftests/vm/run_vmtests
@@ -116,6 +116,17 @@ else
fi
rm -f $mnt/ufd_test_file
+echo "----------------------------"
+echo "running userfaultfd_shmem"
+echo "----------------------------"
+./userfaultfd_shmem 128 32
+if [ $? -ne 0 ]; then
+ echo "[FAIL]"
+ exitcode=1
+else
+ echo "[PASS]"
+fi
+
#cleanup
umount $mnt
rm -rf $mnt