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