selftests: add mincore() tests
Subsystems (2)
PATCH 1/1 selftests: add mincore() tests
Add a test suite for the mincore() syscall. It tests most of its use cases as well as its interface.
Tests implemented:
- basic interface test
- behavior on anonymous mappings
- behavior on anonymous mappings with huge tlb pages
- file-backed mapping with a regular file
- file-backed mapping with a tmpfs file
Signed-off-by Ricardo Cañuelo <[email protected]>
---
Tested in next-20200727 with:
make -C tools/testing/selftests
and
make -C tools/testing/selftests run_tests
tools/testing/selftests/Makefile | 1 + tools/testing/selftests/mincore/.gitignore | 2 + tools/testing/selftests/mincore/Makefile | 6 + .../selftests/mincore/mincore_selftest.c | 361 ++++++++++++++++++ 4 files changed, 370 insertions(+) create mode 100644 tools/testing/selftests/mincore/.gitignore create mode 100644 tools/testing/selftests/mincore/Makefile create mode 100644 tools/testing/selftests/mincore/mincore_selftest.c
tools/testing/selftests/Makefile +1 -0
@@ -32,6 +32,7 @@ TARGETS += lkdtm TARGETS += membarrier TARGETS += memfd TARGETS += memory-hotplug +TARGETS += mincore TARGETS += mount TARGETS += mqueue TARGETS += net
tools/testing/selftests/mincore/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0+ +mincore_selftest
tools/testing/selftests/mincore/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ + +CFLAGS += -Wall + +TEST_GEN_PROGS := mincore_selftest +include ../lib.mk
tools/testing/selftests/mincore/mincore_selftest.c new file +361 -0
361 lines not on this page · raw message
Signature · 1 line
2.18.0