1 # SPDX-License-Identifier: GPL-2.0
2 # Makefile for vm selftests
3 uname_M
:= $(shell uname
-m
2>/dev
/null || echo not
)
4 ARCH ?
= $(shell echo
$(uname_M
) | sed
-e
's/aarch64.*/arm64/')
6 CFLAGS
= -Wall
-I ..
/..
/..
/..
/usr
/include $(EXTRA_CFLAGS
)
8 TEST_GEN_FILES
= compaction_test
9 TEST_GEN_FILES
+= gup_benchmark
10 TEST_GEN_FILES
+= hugepage-mmap
11 TEST_GEN_FILES
+= hugepage-shm
12 TEST_GEN_FILES
+= map_hugetlb
13 TEST_GEN_FILES
+= map_fixed_noreplace
14 TEST_GEN_FILES
+= map_populate
15 TEST_GEN_FILES
+= mlock-random-test
16 TEST_GEN_FILES
+= mlock2-tests
17 TEST_GEN_FILES
+= on-fault-limit
18 TEST_GEN_FILES
+= thuge-gen
19 TEST_GEN_FILES
+= transhuge-stress
20 TEST_GEN_FILES
+= userfaultfd
22 ifneq (,$(filter $(ARCH
),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64
))
23 TEST_GEN_FILES
+= va_128TBswitch
24 TEST_GEN_FILES
+= virtual_address_range
27 TEST_PROGS
:= run_vmtests
29 TEST_FILES
:= test_vmalloc.sh
31 KSFT_KHDR_INSTALL
:= 1
34 $(OUTPUT
)/userfaultfd
: LDLIBS
+= -lpthread
36 $(OUTPUT
)/mlock-random-test
: LDLIBS
+= -lcap