selftests/vm: add a test for virtual address range mapping
PATCH 113/114 selftests/vm: add a test for virtual address range mapping
From: Anshuman Khandual <[email protected]>
Subject: selftests/vm: add a test for virtual address range mapping
This verifies virtual address mapping below and above the 128TB range and makes sure that address returned are within the expected range depending upon the hint passed from the user space.
Signed-off-by Anshuman Khandual <[email protected]>
Cc Michal Suchanek <[email protected]>
Cc Aneesh Kumar K.V <[email protected]>
Cc Shuah Khan <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
tools/testing/selftests/vm/Makefile | 1 tools/testing/selftests/vm/run_vmtests | 11 tools/testing/selftests/vm/virtual_address_range.c | 122 +++++++++++ 3 files changed, 134 insertions(+)
tools/testing/selftests/vm/Makefile renamed from tools/testing/selftests/vm/Makefile~selftests-vm-add-a-test-for-virtual-address-range-mapping +1 -0
@@ -16,6 +16,7 @@ TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += userfaultfd TEST_GEN_FILES += mlock-random-test +TEST_GEN_FILES += virtual_address_range TEST_PROGS := run_vmtests
tools/testing/selftests/vm/run_vmtests renamed from tools/testing/selftests/vm/run_vmtests~selftests-vm-add-a-test-for-virtual-address-range-mapping +11 -0
@@ -165,4 +165,15 @@ else echo "[PASS]" fi +echo "-----------------------------" +echo "running virtual_address_range" +echo "-----------------------------" +./virtual_address_range +if [ $? -ne 0 ]; then + echo "[FAIL]" + exitcode=1 +else + echo "[PASS]" +fi + exit $exitcode
tools/testing/selftests/vm/virtual_address_range.c new file +122 -0
122 lines not on this page · raw message
_