Skip to contentSkip to conversation

selftests/vm: Add a test for virtual address range mapping

PATCH Applied Anshuman Khandual 1 participant 1 message Apr 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 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(+)
 create mode 100644 tools/testing/selftests/vm/virtual_address_range.c
tools/testing/selftests/vm/Makefile +1 -0
index 41642ba..367850a 100644
@@ -18,6 +18,7 @@ TEST_GEN_FILES += userfaultfd
 TEST_GEN_FILES += userfaultfd_hugetlb
 TEST_GEN_FILES += userfaultfd_shmem
 TEST_GEN_FILES += mlock-random-test
+TEST_GEN_FILES += virtual_address_range
 
 TEST_PROGS := run_vmtests
 
tools/testing/selftests/vm/run_vmtests +11 -0
index c92f6cf..abd6a3d 100755
@@ -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

Signature · 7 lines
1.8.5.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>