Skip to content

Commit fee9f6d

Browse files
Ralph Campbelljgunthorpe
authored andcommitted
mm/hmm/test: add selftests for HMM
Add some basic stand alone self tests for HMM. The test program and shell scripts use the test_hmm.ko driver to exercise HMM functionality in the kernel. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ralph Campbell <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent b2ef9f5 commit fee9f6d

File tree

6 files changed

+1478
-0
lines changed

6 files changed

+1478
-0
lines changed

tools/testing/selftests/vm/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ gup_benchmark
1616
va_128TBswitch
1717
map_fixed_noreplace
1818
write_to_hugetlbfs
19+
hmm-tests

tools/testing/selftests/vm/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
77
LDLIBS = -lrt
88
TEST_GEN_FILES = compaction_test
99
TEST_GEN_FILES += gup_benchmark
10+
TEST_GEN_FILES += hmm-tests
1011
TEST_GEN_FILES += hugepage-mmap
1112
TEST_GEN_FILES += hugepage-shm
1213
TEST_GEN_FILES += map_hugetlb
@@ -33,6 +34,8 @@ TEST_FILES := test_vmalloc.sh
3334
KSFT_KHDR_INSTALL := 1
3435
include ../lib.mk
3536

37+
$(OUTPUT)/hmm-tests: LDLIBS += -lhugetlbfs -lpthread
38+
3639
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
3740

3841
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap

tools/testing/selftests/vm/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
CONFIG_SYSVIPC=y
22
CONFIG_USERFAULTFD=y
33
CONFIG_TEST_VMALLOC=m
4+
CONFIG_DEVICE_PRIVATE=y
5+
CONFIG_TEST_HMM=m

0 commit comments

Comments
 (0)