diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2017-02-08 10:27:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-02-08 10:27:10 +1100 |
commit | cf63186ab09f47fa9f6b2f435e71031abf5076ed (patch) | |
tree | 99d3386925684771e8799ef9a0da987c254e1c2b /tools | |
parent | 67262c9408d1679fde5bfbc863be90f093d6b6d1 (diff) |
userfaultfd: non-cooperative: selftest: enable REMOVE event test for shmem
Now when madvise(MADV_REMOVE) notifies uffd reader, we should verify that
appliciation actually sees zeros at the removed range.
Link: http://lkml.kernel.org/r/1484814154-1557-4-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/vm/userfaultfd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 9eb77df568f7..e9449c801888 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -569,9 +569,9 @@ static int userfaultfd_open(int features) * part is accessed after mremap. Since hugetlbfs does not support * mremap, the entire monitored area is accessed in a single pass for * HUGETLB_TEST. - * The release of the pages currently generates event only for + * The release of the pages currently generates event for shmem and * anonymous memory (UFFD_EVENT_REMOVE), hence it is not checked - * for hugetlb and shmem. + * for hugetlb. */ static int faulting_process(void) { @@ -610,7 +610,6 @@ static int faulting_process(void) } } -#ifndef SHMEM_TEST if (release_pages(area_dst)) return 1; @@ -618,7 +617,6 @@ static int faulting_process(void) if (my_bcmp(area_dst + nr * page_size, zeropage, page_size)) fprintf(stderr, "nr %lu is not zero\n", nr), exit(1); } -#endif /* SHMEM_TEST */ #endif /* HUGETLB_TEST */ |