selftests/mm: add framework for uffd-unit-test
authorPeter Xu <peterx@redhat.com>
Wed, 12 Apr 2023 16:43:48 +0000 (12:43 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:30:06 +0000 (16:30 -0700)
commit16a45b57cbf2312215fbac79df4b58a0d70e1f2b
treeb03a630e47d24d7a1586131677f8b2b6ae08c77c
parentbe39fec4f97f01329ef48a5a3836f592f6a82766
selftests/mm: add framework for uffd-unit-test

Add a framework to be prepared to move unit tests from uffd-stress.c into
uffd-unit-tests.c.  The goal is to allow detection of uffd features for
each test, and also loop over specified types of memory that a test
support.

Link: https://lkml.kernel.org/r/20230412164348.328710-1-peterx@redhat.com
Signed-off-by: Peter 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: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-unit-tests.c
tools/testing/selftests/mm/vm_util.c
tools/testing/selftests/mm/vm_util.h