selftests/vm: move 128TB mmap boundary test to generic directory
PATCH 48/119 selftests/vm: move 128TB mmap boundary test to generic directory
From: "Aneesh Kumar K.V" <[email protected]>
Subject: selftests/vm: move 128TB mmap boundary test to generic directory
Architectures like PPC64 support mmap hint address based large address space selection. This test can be run on those architectures too. Move the test from the x86 selftests to selftest/vm so that other architectures can use it too.
We also add a few new test scenarios in this patch. We do test a few boundary conditions before we do a high address mmap. PPC64 uses the address limit to validate the address in the fault path. We had bugs in this area w.r.t SLB fault handling before we updated the addess limit.
We also touch the allocated space to make sure we don't have any bugs in the fault handling path.
---
tools/testing/selftests/vm/Makefile | 5 tools/testing/selftests/vm/run_vmtests | 11 tools/testing/selftests/vm/va_128TBswitch.c | 297 ++++++++++++++++++ tools/testing/selftests/x86/5lvl.c | 177 ---------- 4 files changed, 311 insertions(+), 179 deletions(-)
tools/testing/selftests/vm/Makefile renamed from tools/testing/selftests/vm/Makefile~selftest-vm-move-128tb-mmap-boundary-test-to-generic-directory +3 -2
@@ -8,17 +8,18 @@ endif CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) LDLIBS = -lrt TEST_GEN_FILES = compaction_test +TEST_GEN_FILES += gup_benchmark TEST_GEN_FILES += hugepage-mmap TEST_GEN_FILES += hugepage-shm TEST_GEN_FILES += map_hugetlb +TEST_GEN_FILES += mlock-random-test TEST_GEN_FILES += mlock2-tests TEST_GEN_FILES += on-fault-limit TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += userfaultfd -TEST_GEN_FILES += mlock-random-test +TEST_GEN_FILES += va_128TBswitch TEST_GEN_FILES += virtual_address_range -TEST_GEN_FILES += gup_benchmark TEST_PROGS := run_vmtests
tools/testing/selftests/vm/run_vmtests renamed from tools/testing/selftests/vm/run_vmtests~selftest-vm-move-128tb-mmap-boundary-test-to-generic-directory +11 -0
@@ -177,4 +177,15 @@ else echo "[PASS]" fi +echo "-----------------------------" +echo "running virtual address 128TB switch test" +echo "-----------------------------" +./va_128TBswitch +if [ $? -ne 0 ]; then + echo "[FAIL]" + exitcode=1 +else + echo "[PASS]" +fi + exit $exitcode
tools/testing/selftests/vm/va_128TBswitch.c new file +297 -0
297 lines not on this page · raw message
tools/testing/selftests/x86/5lvl.c deleted +0 -167
167 lines not on this page · raw message