mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
selftests: mm: add pagemap ioctl tests
Add pagemap ioctl tests. Add several different types of tests to judge the correction of the interface. Link: https://lkml.kernel.org/r/20230821141518.870589-7-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: Alex Sierra <alex.sierra@amd.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrei Vagin <avagin@gmail.com> Cc: Axel Rasmussen <axelrasmussen@google.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Hildenbrand <david@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michal Miroslaw <emmir@google.com> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Nadav Amit <namit@vmware.com> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Cc: Paul Gofman <pgofman@codeweavers.com> Cc: Peter Xu <peterx@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Yang Shi <shy828301@gmail.com> Cc: Yun Zhou <yun.zhou@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
18825b8ae9
commit
46fd75d4a3
2
tools/testing/selftests/mm/.gitignore
vendored
2
tools/testing/selftests/mm/.gitignore
vendored
@ -18,6 +18,8 @@ mremap_dontunmap
|
||||
mremap_test
|
||||
on-fault-limit
|
||||
transhuge-stress
|
||||
pagemap_ioctl
|
||||
*.tmp*
|
||||
protection_keys
|
||||
protection_keys_32
|
||||
protection_keys_64
|
||||
|
@ -33,7 +33,7 @@ endif
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
|
||||
LDLIBS = -lrt -lpthread
|
||||
LDLIBS = -lrt -lpthread -lm
|
||||
|
||||
TEST_GEN_FILES = cow
|
||||
TEST_GEN_FILES += compaction_test
|
||||
@ -60,6 +60,7 @@ TEST_GEN_FILES += mrelease_test
|
||||
TEST_GEN_FILES += mremap_dontunmap
|
||||
TEST_GEN_FILES += mremap_test
|
||||
TEST_GEN_FILES += on-fault-limit
|
||||
TEST_GEN_PROGS += pagemap_ioctl
|
||||
TEST_GEN_FILES += thuge-gen
|
||||
TEST_GEN_FILES += transhuge-stress
|
||||
TEST_GEN_FILES += uffd-stress
|
||||
|
@ -1,5 +1,6 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_PTE_MARKER_UFFD_WP=y
|
||||
CONFIG_TEST_VMALLOC=m
|
||||
CONFIG_DEVICE_PRIVATE=y
|
||||
CONFIG_TEST_HMM=m
|
||||
|
1660
tools/testing/selftests/mm/pagemap_ioctl.c
Normal file
1660
tools/testing/selftests/mm/pagemap_ioctl.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -56,6 +56,8 @@ separated by spaces:
|
||||
memory protection key tests
|
||||
- soft_dirty
|
||||
test soft dirty page bit semantics
|
||||
- pagemap
|
||||
test pagemap_scan IOCTL
|
||||
- cow
|
||||
test copy-on-write semantics
|
||||
- thp
|
||||
@ -342,6 +344,8 @@ then
|
||||
CATEGORY="soft_dirty" run_test ./soft-dirty
|
||||
fi
|
||||
|
||||
CATEGORY="pagemap" run_test ./pagemap_ioctl
|
||||
|
||||
# COW tests
|
||||
CATEGORY="cow" run_test ./cow
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user