forked from Minki/linux
235266b8e1
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. [akpm@linux-foundation.org: restore tools/testing/selftests/vm/Makefile alpha ordering] Link: http://lkml.kernel.org/r/20171123165226.32582-1-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
35 lines
882 B
Makefile
35 lines
882 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for vm selftests
|
|
|
|
ifndef OUTPUT
|
|
OUTPUT := $(shell pwd)
|
|
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 += va_128TBswitch
|
|
TEST_GEN_FILES += virtual_address_range
|
|
|
|
TEST_PROGS := run_vmtests
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/userfaultfd: ../../../../usr/include/linux/kernel.h
|
|
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
|
|
|
|
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap
|
|
|
|
../../../../usr/include/linux/kernel.h:
|
|
make -C ../../../.. headers_install
|