• Peter Xu's avatar
    selftests/mm: move uffd sig/events tests into uffd unit tests · 73c1ea93
    Peter Xu authored
    Move the two tests into the unit test, and convert it into 20 standalone
    tests:
    
      - events test on all 5 mem types, with wp on/off
      - signal test on all 5 mem types, with wp on/off
    
      Testing sigbus on anon... done
      Testing sigbus on shmem... done
      Testing sigbus on shmem-private... done
      Testing sigbus on hugetlb... done
      Testing sigbus on hugetlb-private... done
      Testing sigbus-wp on anon... done
      Testing sigbus-wp on shmem... done
      Testing sigbus-wp on shmem-private... done
      Testing sigbus-wp on hugetlb... done
      Testing sigbus-wp on hugetlb-private... done
      Testing events on anon... done
      Testing events on shmem... done
      Testing events on shmem-private... done
      Testing events on hugetlb... done
      Testing events on hugetlb-private... done
      Testing events-wp on anon... done
      Testing events-wp on shmem... done
      Testing events-wp on shmem-private... done
      Testing events-wp on hugetlb... done
      Testing events-wp on hugetlb-private... done
    
    It'll also remove a lot of global references along the way,
    e.g. test_uffdio_wp will be replaced with the wp value passed over.
    
    Link: https://lkml.kernel.org/r/20230412164400.328798-1-peterx@redhat.comSigned-off-by: default avatarPeter Xu <peterx@redhat.com>
    Cc: Axel Rasmussen <axelrasmussen@google.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Dmitry Safonov <0x7f454c46@gmail.com>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Zach O'Keefe <zokeefe@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    73c1ea93
uffd-stress.c 15.6 KB