aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorbamvor.zhangjian@huawei.com <bamvor.zhangjian@huawei.com>2016-11-29 06:55:47 -0500
committerShuah Khan <shuahkh@osg.samsung.com>2017-01-05 15:41:35 -0500
commit88baa78d1f318e57c7cccbfe55d485befd1ce696 (patch)
treecb347afb828c352e56c22449dd0b207894f25eba /tools
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
selftests: remove duplicated all and clean target
Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to indicate the test program, extended test program and test files. It is easy to understand the purpose of these files. But mix of compiled and uncompiled files lead to duplicated "all" and "clean" targets. In order to remove the duplicated targets, introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled objects. Also, the later patch will make use of TEST_GEN_XXX to redirect these files to output directory indicated by KBUILD_OUTPUT or O. And add this changes to "Contributing new tests(details)" of Documentation/kselftest.txt. Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/Makefile10
-rw-r--r--tools/testing/selftests/breakpoints/Makefile10
-rw-r--r--tools/testing/selftests/capabilities/Makefile11
-rw-r--r--tools/testing/selftests/efivarfs/Makefile8
-rw-r--r--tools/testing/selftests/exec/Makefile10
-rw-r--r--tools/testing/selftests/futex/functional/Makefile12
-rw-r--r--tools/testing/selftests/ipc/Makefile7
-rw-r--r--tools/testing/selftests/kcmp/Makefile6
-rw-r--r--tools/testing/selftests/lib.mk18
-rw-r--r--tools/testing/selftests/membarrier/Makefile6
-rw-r--r--tools/testing/selftests/memfd/Makefile14
-rw-r--r--tools/testing/selftests/mount/Makefile6
-rw-r--r--tools/testing/selftests/mqueue/Makefile6
-rw-r--r--tools/testing/selftests/net/Makefile13
-rw-r--r--tools/testing/selftests/nsfs/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/alignment/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/Makefile11
-rw-r--r--tools/testing/selftests/powerpc/context_switch/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/copyloops/Makefile11
-rw-r--r--tools/testing/selftests/powerpc/dscr/Makefile13
-rw-r--r--tools/testing/selftests/powerpc/math/Makefile13
-rw-r--r--tools/testing/selftests/powerpc/mm/Makefile12
-rw-r--r--tools/testing/selftests/powerpc/pmu/Makefile12
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/Makefile11
-rw-r--r--tools/testing/selftests/powerpc/primitives/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/stringloops/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/Makefile8
-rw-r--r--tools/testing/selftests/powerpc/syscalls/Makefile9
-rw-r--r--tools/testing/selftests/powerpc/tm/Makefile11
-rw-r--r--tools/testing/selftests/powerpc/vphn/Makefile10
-rw-r--r--tools/testing/selftests/ptrace/Makefile8
-rw-r--r--tools/testing/selftests/seccomp/Makefile6
-rw-r--r--tools/testing/selftests/sigaltstack/Makefile5
-rw-r--r--tools/testing/selftests/size/Makefile6
-rw-r--r--tools/testing/selftests/timers/Makefile9
-rw-r--r--tools/testing/selftests/vm/Makefile24
36 files changed, 106 insertions, 255 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 7a5f24543a5f..058351b0694f 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,13 +1,7 @@
1CFLAGS += -Wall -O2 -I../../../../usr/include 1CFLAGS += -Wall -O2 -I../../../../usr/include
2 2
3test_objs = test_verifier test_maps test_lru_map 3TEST_GEN_PROGS = test_verifier test_maps test_lru_map
4 4
5TEST_PROGS := test_verifier test_maps test_lru_map test_kmod.sh 5TEST_PROGS := test_kmod.sh
6TEST_FILES := $(test_objs)
7
8all: $(test_objs)
9 6
10include ../lib.mk 7include ../lib.mk
11
12clean:
13 $(RM) $(test_objs)
diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile
index 61b79e8df1f4..72aa103e4141 100644
--- a/tools/testing/selftests/breakpoints/Makefile
+++ b/tools/testing/selftests/breakpoints/Makefile
@@ -3,17 +3,13 @@ uname_M := $(shell uname -m 2>/dev/null || echo not)
3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
4 4
5ifeq ($(ARCH),x86) 5ifeq ($(ARCH),x86)
6TEST_PROGS := breakpoint_test 6TEST_GEN_PROGS := breakpoint_test
7endif 7endif
8ifeq ($(ARCH),aarch64) 8ifeq ($(ARCH),aarch64)
9TEST_PROGS := breakpoint_test_arm64 9TEST_GEN_PROGS := breakpoint_test_arm64
10endif 10endif
11 11
12TEST_PROGS += step_after_suspend_test 12TEST_GEN_PROGS += step_after_suspend_test
13
14all: $(TEST_PROGS)
15 13
16include ../lib.mk 14include ../lib.mk
17 15
18clean:
19 rm -fr breakpoint_test breakpoint_test_arm64 step_after_suspend_test
diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile
index 008602aed920..29b8adfdac71 100644
--- a/tools/testing/selftests/capabilities/Makefile
+++ b/tools/testing/selftests/capabilities/Makefile
@@ -1,15 +1,8 @@
1TEST_FILES := validate_cap 1TEST_GEN_FILES := validate_cap
2TEST_PROGS := test_execve 2TEST_GEN_PROGS := test_execve
3
4BINARIES := $(TEST_FILES) $(TEST_PROGS)
5 3
6CFLAGS += -O2 -g -std=gnu99 -Wall 4CFLAGS += -O2 -g -std=gnu99 -Wall
7LDLIBS += -lcap-ng -lrt -ldl 5LDLIBS += -lcap-ng -lrt -ldl
8 6
9all: $(BINARIES)
10
11clean:
12 $(RM) $(BINARIES)
13
14include ../lib.mk 7include ../lib.mk
15 8
diff --git a/tools/testing/selftests/efivarfs/Makefile b/tools/testing/selftests/efivarfs/Makefile
index 736c3ddfc787..c49dcea69319 100644
--- a/tools/testing/selftests/efivarfs/Makefile
+++ b/tools/testing/selftests/efivarfs/Makefile
@@ -1,13 +1,7 @@
1CFLAGS = -Wall 1CFLAGS = -Wall
2 2
3test_objs = open-unlink create-read 3TEST_GEN_FILES := open-unlink create-read
4
5all: $(test_objs)
6
7TEST_PROGS := efivarfs.sh 4TEST_PROGS := efivarfs.sh
8TEST_FILES := $(test_objs)
9 5
10include ../lib.mk 6include ../lib.mk
11 7
12clean:
13 rm -f $(test_objs)
diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index d4300602bf37..b3bf091368ca 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -1,7 +1,4 @@
1CFLAGS = -Wall 1CFLAGS = -Wall
2BINARIES = execveat
3DEPS = execveat.symlink execveat.denatured script subdir
4all: $(BINARIES) $(DEPS)
5 2
6subdir: 3subdir:
7 mkdir -p $@ 4 mkdir -p $@
@@ -17,11 +14,12 @@ execveat.denatured: execveat
17%: %.c 14%: %.c
18 $(CC) $(CFLAGS) -o $@ $^ 15 $(CC) $(CFLAGS) -o $@ $^
19 16
20TEST_PROGS := execveat 17TEST_GEN_PROGS := execveat
18TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
21# Makefile is a run-time dependency, since it's accessed by the execveat test 19# Makefile is a run-time dependency, since it's accessed by the execveat test
22TEST_FILES := $(DEPS) Makefile 20TEST_FILES := Makefile
23 21
24include ../lib.mk 22include ../lib.mk
25 23
26clean: 24clean:
27 rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx* 25 rm -rf $(TEST_GEN_PROGS) $(TEST_GEN_FILES) subdir.moved execveat.moved xxxxx*
diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 9d6b75ef7b5d..ac35782ce1e5 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -3,7 +3,7 @@ CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
3LDFLAGS := $(LDFLAGS) -pthread -lrt 3LDFLAGS := $(LDFLAGS) -pthread -lrt
4 4
5HEADERS := ../include/futextest.h 5HEADERS := ../include/futextest.h
6TARGETS := \ 6TEST_GEN_FILES := \
7 futex_wait_timeout \ 7 futex_wait_timeout \
8 futex_wait_wouldblock \ 8 futex_wait_wouldblock \
9 futex_requeue_pi \ 9 futex_requeue_pi \
@@ -12,14 +12,8 @@ TARGETS := \
12 futex_wait_uninitialized_heap \ 12 futex_wait_uninitialized_heap \
13 futex_wait_private_mapped_file 13 futex_wait_private_mapped_file
14 14
15TEST_PROGS := $(TARGETS) run.sh 15TEST_PROGS := run.sh
16
17.PHONY: all clean
18all: $(TARGETS)
19
20$(TARGETS): $(HEADERS)
21 16
22include ../../lib.mk 17include ../../lib.mk
23 18
24clean: 19$(TEST_GEN_FILES): $(HEADERS)
25 rm -f $(TARGETS)
diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile
index 25d2e702c68a..30ef4c7f53ea 100644
--- a/tools/testing/selftests/ipc/Makefile
+++ b/tools/testing/selftests/ipc/Makefile
@@ -11,12 +11,7 @@ endif
11 11
12CFLAGS += -I../../../../usr/include/ 12CFLAGS += -I../../../../usr/include/
13 13
14all: 14TEST_GEN_PROGS := msgque
15 $(CC) $(CFLAGS) msgque.c -o msgque_test
16
17TEST_PROGS := msgque_test
18 15
19include ../lib.mk 16include ../lib.mk
20 17
21clean:
22 rm -fr ./msgque_test
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 2ae7450a9a89..9e8b673d41b1 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -1,10 +1,8 @@
1CFLAGS += -I../../../../usr/include/ 1CFLAGS += -I../../../../usr/include/
2 2
3all: kcmp_test 3TEST_GEN_PROGS := kcmp_test
4
5TEST_PROGS := kcmp_test
6 4
7include ../lib.mk 5include ../lib.mk
8 6
9clean: 7clean:
10 $(RM) kcmp_test kcmp-test-file 8 $(RM) $(TEST_GEN_PROGS) kcmp-test-file
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 50a93f5f13d6..9fddffd066ca 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -3,7 +3,7 @@
3CC := $(CROSS_COMPILE)gcc 3CC := $(CROSS_COMPILE)gcc
4 4
5define RUN_TESTS 5define RUN_TESTS
6 @for TEST in $(TEST_PROGS); do \ 6 @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \
7 (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \ 7 (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
8 done; 8 done;
9endef 9endef
@@ -14,8 +14,13 @@ run_tests: all
14define INSTALL_RULE 14define INSTALL_RULE
15 @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ 15 @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
16 mkdir -p ${INSTALL_PATH}; \ 16 mkdir -p ${INSTALL_PATH}; \
17 echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \ 17 echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
18 rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \ 18 rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \
19 fi
20 @if [ "X$(TEST_GEN_PROGS)$(TEST_GEN_PROGS_EXTENDED)$(TEST_GEN_FILES)" != "X" ]; then \
21 mkdir -p ${INSTALL_PATH}; \
22 echo "rsync -a $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/"; \
23 rsync -a $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/; \
19 fi 24 fi
20endef 25endef
21 26
@@ -27,7 +32,7 @@ else
27endif 32endif
28 33
29define EMIT_TESTS 34define EMIT_TESTS
30 @for TEST in $(TEST_PROGS); do \ 35 @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \
31 echo "(./$$TEST && echo \"selftests: $$TEST [PASS]\") || echo \"selftests: $$TEST [FAIL]\""; \ 36 echo "(./$$TEST && echo \"selftests: $$TEST [PASS]\") || echo \"selftests: $$TEST [FAIL]\""; \
32 done; 37 done;
33endef 38endef
@@ -35,4 +40,9 @@ endef
35emit_tests: 40emit_tests:
36 $(EMIT_TESTS) 41 $(EMIT_TESTS)
37 42
43all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
44
45clean:
46 $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
47
38.PHONY: run_tests all clean install emit_tests 48.PHONY: run_tests all clean install emit_tests
diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile
index a1a97085847d..02845532b059 100644
--- a/tools/testing/selftests/membarrier/Makefile
+++ b/tools/testing/selftests/membarrier/Makefile
@@ -1,10 +1,6 @@
1CFLAGS += -g -I../../../../usr/include/ 1CFLAGS += -g -I../../../../usr/include/
2 2
3TEST_PROGS := membarrier_test 3TEST_GEN_PROGS := membarrier_test
4
5all: $(TEST_PROGS)
6 4
7include ../lib.mk 5include ../lib.mk
8 6
9clean:
10 $(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index fd396ac811b6..2c87f2376e59 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -4,19 +4,11 @@ CFLAGS += -I../../../../include/uapi/
4CFLAGS += -I../../../../include/ 4CFLAGS += -I../../../../include/
5CFLAGS += -I../../../../usr/include/ 5CFLAGS += -I../../../../usr/include/
6 6
7TEST_PROGS := memfd_test 7TEST_PROGS := run_fuse_test.sh
8 8TEST_GEN_FILES := memfd_test fuse_mnt fuse_test
9all: $(TEST_PROGS)
10
11include ../lib.mk
12
13build_fuse: fuse_mnt fuse_test
14 9
15fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) 10fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
16fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) 11fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs)
17 12
18run_fuse: build_fuse 13include ../lib.mk
19 @./run_fuse_test.sh || echo "fuse_test: [FAIL]"
20 14
21clean:
22 $(RM) memfd_test fuse_test
diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
index 5e35c9c50b72..e8fb15e80172 100644
--- a/tools/testing/selftests/mount/Makefile
+++ b/tools/testing/selftests/mount/Makefile
@@ -1,14 +1,14 @@
1# Makefile for mount selftests. 1# Makefile for mount selftests.
2CFLAGS = -Wall \ 2CFLAGS = -Wall \
3 -O2 3 -O2
4all: unprivileged-remount-test
5 4
6unprivileged-remount-test: unprivileged-remount-test.c 5unprivileged-remount-test: unprivileged-remount-test.c
7 $(CC) $(CFLAGS) unprivileged-remount-test.c -o unprivileged-remount-test 6 $(CC) $(CFLAGS) unprivileged-remount-test.c -o unprivileged-remount-test
8 7
8TEST_GEN_PROGS := unprivileged-remount-test
9
9include ../lib.mk 10include ../lib.mk
10 11
11TEST_PROGS := unprivileged-remount-test
12override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ 12override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
13 then \ 13 then \
14 ./unprivileged-remount-test ; \ 14 ./unprivileged-remount-test ; \
@@ -17,5 +17,3 @@ override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
17 fi 17 fi
18override EMIT_TESTS := echo "$(RUN_TESTS)" 18override EMIT_TESTS := echo "$(RUN_TESTS)"
19 19
20clean:
21 rm -f unprivileged-remount-test
diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index eebac29acbd9..79a664aeb8d7 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,8 +1,6 @@
1CFLAGS += -O2 1CFLAGS += -O2
2LDLIBS = -lrt -lpthread -lpopt 2LDLIBS = -lrt -lpthread -lpopt
3TEST_PROGS := mq_open_tests mq_perf_tests 3TEST_GEN_PROGS := mq_open_tests mq_perf_tests
4
5all: $(TEST_PROGS)
6 4
7include ../lib.mk 5include ../lib.mk
8 6
@@ -16,5 +14,3 @@ override define EMIT_TESTS
16 echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\"" 14 echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
17endef 15endef
18 16
19clean:
20 rm -f mq_open_tests mq_perf_tests
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index e24e4c82542e..fe5b36dd7140 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -3,20 +3,15 @@
3CFLAGS = -Wall -Wl,--no-as-needed -O2 -g 3CFLAGS = -Wall -Wl,--no-as-needed -O2 -g
4CFLAGS += -I../../../../usr/include/ 4CFLAGS += -I../../../../usr/include/
5 5
6NET_PROGS = socket
7NET_PROGS += psock_fanout psock_tpacket
8NET_PROGS += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
9NET_PROGS += reuseport_dualstack
10
11all: $(NET_PROGS)
12reuseport_bpf_numa: LDFLAGS += -lnuma 6reuseport_bpf_numa: LDFLAGS += -lnuma
13%: %.c 7%: %.c
14 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ 8 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
15 9
16TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh 10TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh
17TEST_FILES := $(NET_PROGS) 11TEST_GEN_FILES = socket
12TEST_GEN_FILES += psock_fanout psock_tpacket
13TEST_GEN_FILES += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
14TEST_GEN_FILES += reuseport_dualstack
18 15
19include ../lib.mk 16include ../lib.mk
20 17
21clean:
22 $(RM) $(NET_PROGS)
diff --git a/tools/testing/selftests/nsfs/Makefile b/tools/testing/selftests/nsfs/Makefile
index 2306054a901a..9ff7c7f80625 100644
--- a/tools/testing/selftests/nsfs/Makefile
+++ b/tools/testing/selftests/nsfs/Makefile
@@ -1,12 +1,5 @@
1TEST_PROGS := owner pidns 1TEST_GEN_PROGS := owner pidns
2 2
3CFLAGS := -Wall -Werror 3CFLAGS := -Wall -Werror
4 4
5all: owner pidns
6owner: owner.c
7pidns: pidns.c
8
9clean:
10 $(RM) owner pidns
11
12include ../lib.mk 5include ../lib.mk
diff --git a/tools/testing/selftests/powerpc/alignment/Makefile b/tools/testing/selftests/powerpc/alignment/Makefile
index ad6a4e49da91..16b22004e75f 100644
--- a/tools/testing/selftests/powerpc/alignment/Makefile
+++ b/tools/testing/selftests/powerpc/alignment/Makefile
@@ -1,10 +1,5 @@
1TEST_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned 1TEST_GEN_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned
2
3all: $(TEST_PROGS)
4
5$(TEST_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c
6 2
7include ../../lib.mk 3include ../../lib.mk
8 4
9clean: 5$(TEST_GEN_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c
10 rm -f $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/benchmarks/Makefile b/tools/testing/selftests/powerpc/benchmarks/Makefile
index 545077f98f72..08a55bd17800 100644
--- a/tools/testing/selftests/powerpc/benchmarks/Makefile
+++ b/tools/testing/selftests/powerpc/benchmarks/Makefile
@@ -1,16 +1,11 @@
1TEST_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall 1TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall
2 2
3CFLAGS += -O2 3CFLAGS += -O2
4 4
5all: $(TEST_PROGS) 5$(TEST_GEN_PROGS): ../harness.c
6 6
7$(TEST_PROGS): ../harness.c 7include ../../lib.mk
8 8
9context_switch: ../utils.c 9context_switch: ../utils.c
10context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec 10context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec
11context_switch: LDLIBS += -lpthread 11context_switch: LDLIBS += -lpthread
12
13include ../../lib.mk
14
15clean:
16 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/context_switch/Makefile b/tools/testing/selftests/powerpc/context_switch/Makefile
index e164d1466466..e9351bb4285d 100644
--- a/tools/testing/selftests/powerpc/context_switch/Makefile
+++ b/tools/testing/selftests/powerpc/context_switch/Makefile
@@ -1,10 +1,5 @@
1TEST_PROGS := cp_abort 1TEST_GEN_PROGS := cp_abort
2
3all: $(TEST_PROGS)
4
5$(TEST_PROGS): ../harness.c ../utils.c
6 2
7include ../../lib.mk 3include ../../lib.mk
8 4
9clean: 5$(TEST_GEN_PROGS): ../harness.c ../utils.c
10 rm -f $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile
index 384843ea0d40..9ad1558e2ea9 100644
--- a/tools/testing/selftests/powerpc/copyloops/Makefile
+++ b/tools/testing/selftests/powerpc/copyloops/Makefile
@@ -7,19 +7,14 @@ CFLAGS += -maltivec
7# Use our CFLAGS for the implicit .S rule 7# Use our CFLAGS for the implicit .S rule
8ASFLAGS = $(CFLAGS) 8ASFLAGS = $(CFLAGS)
9 9
10TEST_PROGS := copyuser_64 copyuser_power7 memcpy_64 memcpy_power7 10TEST_GEN_PROGS := copyuser_64 copyuser_power7 memcpy_64 memcpy_power7
11EXTRA_SOURCES := validate.c ../harness.c 11EXTRA_SOURCES := validate.c ../harness.c
12 12
13all: $(TEST_PROGS) 13include ../../lib.mk
14 14
15copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base 15copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base
16copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7 16copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7
17memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy 17memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy
18memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7 18memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7
19 19
20$(TEST_PROGS): $(EXTRA_SOURCES) 20$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
21
22include ../../lib.mk
23
24clean:
25 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/dscr/Makefile b/tools/testing/selftests/powerpc/dscr/Makefile
index 49327ee84e3a..4262de42017b 100644
--- a/tools/testing/selftests/powerpc/dscr/Makefile
+++ b/tools/testing/selftests/powerpc/dscr/Makefile
@@ -1,14 +1,9 @@
1TEST_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \ 1TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \
2 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \ 2 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \
3 dscr_sysfs_thread_test 3 dscr_sysfs_thread_test
4 4
5dscr_default_test: LDLIBS += -lpthread
6
7all: $(TEST_PROGS)
8
9$(TEST_PROGS): ../harness.c
10
11include ../../lib.mk 5include ../../lib.mk
12 6
13clean: 7dscr_default_test: LDLIBS += -lpthread
14 rm -f $(TEST_PROGS) *.o 8
9$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/math/Makefile b/tools/testing/selftests/powerpc/math/Makefile
index a505b66d408a..814c38591b13 100644
--- a/tools/testing/selftests/powerpc/math/Makefile
+++ b/tools/testing/selftests/powerpc/math/Makefile
@@ -1,9 +1,9 @@
1TEST_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt 1TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt
2 2
3all: $(TEST_PROGS) 3include ../../lib.mk
4 4
5$(TEST_PROGS): ../harness.c 5$(TEST_GEN_PROGS): ../harness.c
6$(TEST_PROGS): CFLAGS += -O2 -g -pthread -m64 -maltivec 6$(TEST_GEN_PROGS): CFLAGS += -O2 -g -pthread -m64 -maltivec
7 7
8fpu_syscall: fpu_asm.S 8fpu_syscall: fpu_asm.S
9fpu_preempt: fpu_asm.S 9fpu_preempt: fpu_asm.S
@@ -15,8 +15,3 @@ vmx_signal: vmx_asm.S
15 15
16vsx_preempt: CFLAGS += -mvsx 16vsx_preempt: CFLAGS += -mvsx
17vsx_preempt: vsx_asm.S 17vsx_preempt: vsx_asm.S
18
19include ../../lib.mk
20
21clean:
22 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile
index 3bdb96eae558..d5633783c82e 100644
--- a/tools/testing/selftests/powerpc/mm/Makefile
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -1,19 +1,15 @@
1noarg: 1noarg:
2 $(MAKE) -C ../ 2 $(MAKE) -C ../
3 3
4TEST_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao 4TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao
5TEST_FILES := tempfile 5TEST_GEN_FILES := tempfile
6 6
7all: $(TEST_PROGS) $(TEST_FILES) 7include ../../lib.mk
8 8
9$(TEST_PROGS): ../harness.c 9$(TEST_GEN_PROGS): ../harness.c
10 10
11prot_sao: ../utils.c 11prot_sao: ../utils.c
12 12
13include ../../lib.mk
14
15tempfile: 13tempfile:
16 dd if=/dev/zero of=tempfile bs=64k count=1 14 dd if=/dev/zero of=tempfile bs=64k count=1
17 15
18clean:
19 rm -f $(TEST_PROGS) tempfile
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
index ac41a7177f2e..ab0f9026c21c 100644
--- a/tools/testing/selftests/powerpc/pmu/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -1,12 +1,14 @@
1noarg: 1noarg:
2 $(MAKE) -C ../ 2 $(MAKE) -C ../
3 3
4TEST_PROGS := count_instructions l3_bank_test per_event_excludes 4TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes
5EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c 5EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c
6 6
7all: $(TEST_PROGS) ebb 7include ../../lib.mk
8
9all: $(TEST_GEN_PROGS) ebb
8 10
9$(TEST_PROGS): $(EXTRA_SOURCES) 11$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
10 12
11# loop.S can only be built 64-bit 13# loop.S can only be built 64-bit
12count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) 14count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
@@ -14,8 +16,6 @@ count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
14 16
15per_event_excludes: ../utils.c 17per_event_excludes: ../utils.c
16 18
17include ../../lib.mk
18
19DEFAULT_RUN_TESTS := $(RUN_TESTS) 19DEFAULT_RUN_TESTS := $(RUN_TESTS)
20override define RUN_TESTS 20override define RUN_TESTS
21 $(DEFAULT_RUN_TESTS) 21 $(DEFAULT_RUN_TESTS)
@@ -35,7 +35,7 @@ override define INSTALL_RULE
35endef 35endef
36 36
37clean: 37clean:
38 rm -f $(TEST_PROGS) loop.o 38 $(RM) $(TEST_PROGS) loop.o
39 $(MAKE) -C ebb clean 39 $(MAKE) -C ebb clean
40 40
41ebb: 41ebb:
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index 8d2279c4bb4b..0bc2bd6db511 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -4,7 +4,7 @@ noarg:
4# The EBB handler is 64-bit code and everything links against it 4# The EBB handler is 64-bit code and everything links against it
5CFLAGS += -m64 5CFLAGS += -m64
6 6
7TEST_PROGS := reg_access_test event_attributes_test cycles_test \ 7TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
8 cycles_with_freeze_test pmc56_overflow_test \ 8 cycles_with_freeze_test pmc56_overflow_test \
9 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \ 9 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \
10 cpu_event_pinned_vs_ebb_test task_event_vs_ebb_test \ 10 cpu_event_pinned_vs_ebb_test task_event_vs_ebb_test \
@@ -16,16 +16,11 @@ TEST_PROGS := reg_access_test event_attributes_test cycles_test \
16 lost_exception_test no_handler_test \ 16 lost_exception_test no_handler_test \
17 cycles_with_mmcr2_test 17 cycles_with_mmcr2_test
18 18
19all: $(TEST_PROGS) 19include ../../../lib.mk
20 20
21$(TEST_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \ 21$(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \
22 ebb.c ebb_handler.S trace.c busy_loop.S 22 ebb.c ebb_handler.S trace.c busy_loop.S
23 23
24instruction_count_test: ../loop.S 24instruction_count_test: ../loop.S
25 25
26lost_exception_test: ../lib.c 26lost_exception_test: ../lib.c
27
28include ../../../lib.mk
29
30clean:
31 rm -f $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/primitives/Makefile b/tools/testing/selftests/powerpc/primitives/Makefile
index b68c6221d3d1..175366db7be8 100644
--- a/tools/testing/selftests/powerpc/primitives/Makefile
+++ b/tools/testing/selftests/powerpc/primitives/Makefile
@@ -1,12 +1,7 @@
1CFLAGS += -I$(CURDIR) 1CFLAGS += -I$(CURDIR)
2 2
3TEST_PROGS := load_unaligned_zeropad 3TEST_GEN_PROGS := load_unaligned_zeropad
4
5all: $(TEST_PROGS)
6
7$(TEST_PROGS): ../harness.c
8 4
9include ../../lib.mk 5include ../../lib.mk
10 6
11clean: 7$(TEST_GEN_PROGS): ../harness.c
12 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 2a728f4d2873..557b9379f3bb 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -2,14 +2,9 @@
2CFLAGS += -m64 2CFLAGS += -m64
3CFLAGS += -I$(CURDIR) 3CFLAGS += -I$(CURDIR)
4 4
5TEST_PROGS := memcmp 5TEST_GEN_PROGS := memcmp
6EXTRA_SOURCES := memcmp_64.S ../harness.c 6EXTRA_SOURCES := memcmp_64.S ../harness.c
7 7
8all: $(TEST_PROGS)
9
10$(TEST_PROGS): $(EXTRA_SOURCES)
11
12include ../../lib.mk 8include ../../lib.mk
13 9
14clean: 10$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
15 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/switch_endian/Makefile b/tools/testing/selftests/powerpc/switch_endian/Makefile
index e21d10674e54..bd0122306da6 100644
--- a/tools/testing/selftests/powerpc/switch_endian/Makefile
+++ b/tools/testing/selftests/powerpc/switch_endian/Makefile
@@ -1,8 +1,8 @@
1TEST_PROGS := switch_endian_test 1TEST_GEN_PROGS := switch_endian_test
2 2
3ASFLAGS += -O2 -Wall -g -nostdlib -m64 3ASFLAGS += -O2 -Wall -g -nostdlib -m64
4 4
5all: $(TEST_PROGS) 5include ../../lib.mk
6 6
7switch_endian_test: check-reversed.S 7switch_endian_test: check-reversed.S
8 8
@@ -12,7 +12,5 @@ check-reversed.o: check.o
12check-reversed.S: check-reversed.o 12check-reversed.S: check-reversed.o
13 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@ 13 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@
14 14
15include ../../lib.mk
16
17clean: 15clean:
18 rm -f $(TEST_PROGS) *.o check-reversed.S 16 $(RM) $(TEST_GEN_PROGS) *.o check-reversed.S
diff --git a/tools/testing/selftests/powerpc/syscalls/Makefile b/tools/testing/selftests/powerpc/syscalls/Makefile
index b35c7945bec5..da22ca7c38c1 100644
--- a/tools/testing/selftests/powerpc/syscalls/Makefile
+++ b/tools/testing/selftests/powerpc/syscalls/Makefile
@@ -1,12 +1,7 @@
1TEST_PROGS := ipc_unmuxed 1TEST_GEN_PROGS := ipc_unmuxed
2 2
3CFLAGS += -I../../../../../usr/include 3CFLAGS += -I../../../../../usr/include
4 4
5all: $(TEST_PROGS)
6
7$(TEST_PROGS): ../harness.c
8
9include ../../lib.mk 5include ../../lib.mk
10 6
11clean: 7$(TEST_GEN_PROGS): ../harness.c
12 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index c6c53c82fdd6..117c6247928a 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -1,12 +1,12 @@
1SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \ 1SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
2 tm-signal-context-chk-vmx tm-signal-context-chk-vsx 2 tm-signal-context-chk-vmx tm-signal-context-chk-vsx
3 3
4TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \ 4TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
5 tm-vmxcopy tm-fork tm-tar tm-tmspr $(SIGNAL_CONTEXT_CHK_TESTS) 5 tm-vmxcopy tm-fork tm-tar tm-tmspr $(SIGNAL_CONTEXT_CHK_TESTS)
6 6
7all: $(TEST_PROGS) 7include ../../lib.mk
8 8
9$(TEST_PROGS): ../harness.c ../utils.c 9$(TEST_GEN_PROGS): ../harness.c ../utils.c
10 10
11CFLAGS += -mhtm 11CFLAGS += -mhtm
12 12
@@ -16,8 +16,3 @@ tm-tmspr: CFLAGS += -pthread
16 16
17$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S 17$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S
18$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx 18$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx
19
20include ../../lib.mk
21
22clean:
23 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/vphn/Makefile b/tools/testing/selftests/powerpc/vphn/Makefile
index a485f2e286ae..f8ced26748f8 100644
--- a/tools/testing/selftests/powerpc/vphn/Makefile
+++ b/tools/testing/selftests/powerpc/vphn/Makefile
@@ -1,12 +1,8 @@
1TEST_PROGS := test-vphn 1TEST_GEN_PROGS := test-vphn
2 2
3CFLAGS += -m64 3CFLAGS += -m64
4 4
5all: $(TEST_PROGS)
6
7$(TEST_PROGS): ../harness.c
8
9include ../../lib.mk 5include ../../lib.mk
10 6
11clean: 7$(TEST_GEN_PROGS): ../harness.c
12 rm -f $(TEST_PROGS) 8
diff --git a/tools/testing/selftests/ptrace/Makefile b/tools/testing/selftests/ptrace/Makefile
index 453927fea90c..8a2bc5562179 100644
--- a/tools/testing/selftests/ptrace/Makefile
+++ b/tools/testing/selftests/ptrace/Makefile
@@ -1,11 +1,5 @@
1CFLAGS += -iquote../../../../include/uapi -Wall 1CFLAGS += -iquote../../../../include/uapi -Wall
2peeksiginfo: peeksiginfo.c
3 2
4all: peeksiginfo 3TEST_GEN_PROGS := peeksiginfo
5
6clean:
7 rm -f peeksiginfo
8
9TEST_PROGS := peeksiginfo
10 4
11include ../lib.mk 5include ../lib.mk
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index 8401e87e34e1..5fa6fd2246b1 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -1,10 +1,6 @@
1TEST_PROGS := seccomp_bpf 1TEST_GEN_PROGS := seccomp_bpf
2CFLAGS += -Wl,-no-as-needed -Wall 2CFLAGS += -Wl,-no-as-needed -Wall
3LDFLAGS += -lpthread 3LDFLAGS += -lpthread
4 4
5all: $(TEST_PROGS)
6
7include ../lib.mk 5include ../lib.mk
8 6
9clean:
10 $(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/sigaltstack/Makefile b/tools/testing/selftests/sigaltstack/Makefile
index 56af56eda6fa..f68fbf80d8be 100644
--- a/tools/testing/selftests/sigaltstack/Makefile
+++ b/tools/testing/selftests/sigaltstack/Makefile
@@ -1,8 +1,5 @@
1CFLAGS = -Wall 1CFLAGS = -Wall
2BINARIES = sas 2TEST_GEN_PROGS = sas
3all: $(BINARIES)
4 3
5include ../lib.mk 4include ../lib.mk
6 5
7clean:
8 rm -rf $(BINARIES)
diff --git a/tools/testing/selftests/size/Makefile b/tools/testing/selftests/size/Makefile
index bbd0b5398b61..c67f3577e888 100644
--- a/tools/testing/selftests/size/Makefile
+++ b/tools/testing/selftests/size/Makefile
@@ -1,11 +1,7 @@
1all: get_size
2 1
3get_size: get_size.c 2get_size: get_size.c
4 $(CC) -static -ffreestanding -nostartfiles -s $< -o $@ 3 $(CC) -static -ffreestanding -nostartfiles -s $< -o $@
5 4
6TEST_PROGS := get_size 5TEST_GEN_PROGS := get_size
7 6
8include ../lib.mk 7include ../lib.mk
9
10clean:
11 $(RM) get_size
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index 1d5556869137..4a3bffed9901 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -5,16 +5,13 @@ LDFLAGS += -lrt -lpthread
5 5
6# these are all "safe" tests that don't modify 6# these are all "safe" tests that don't modify
7# system time or require escalated privledges 7# system time or require escalated privledges
8TEST_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ 8TEST_GEN_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \
9 inconsistency-check raw_skew threadtest rtctest 9 inconsistency-check raw_skew threadtest rtctest
10 10
11TEST_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ 11TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \
12 skew_consistency clocksource-switch leap-a-day \ 12 skew_consistency clocksource-switch leap-a-day \
13 leapcrash set-tai set-2038 set-tz 13 leapcrash set-tai set-2038 set-tz
14 14
15bins = $(TEST_PROGS) $(TEST_PROGS_EXTENDED)
16
17all: ${bins}
18 15
19include ../lib.mk 16include ../lib.mk
20 17
@@ -34,5 +31,3 @@ run_destructive_tests: run_tests
34 ./set-tai 31 ./set-tai
35 ./set-2038 32 ./set-2038
36 33
37clean:
38 rm -f ${bins}
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index bbab7f4664ac..323383ab4581 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,18 +1,17 @@
1# Makefile for vm selftests 1# Makefile for vm selftests
2 2
3CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) 3CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
4BINARIES = compaction_test 4TEST_GEN_FILES = compaction_test
5BINARIES += hugepage-mmap 5TEST_GEN_FILES += hugepage-mmap
6BINARIES += hugepage-shm 6TEST_GEN_FILES += hugepage-shm
7BINARIES += map_hugetlb 7TEST_GEN_FILES += map_hugetlb
8BINARIES += mlock2-tests 8TEST_GEN_FILES += mlock2-tests
9BINARIES += on-fault-limit 9TEST_GEN_FILES += on-fault-limit
10BINARIES += thuge-gen 10TEST_GEN_FILES += thuge-gen
11BINARIES += transhuge-stress 11TEST_GEN_FILES += transhuge-stress
12BINARIES += userfaultfd 12TEST_GEN_FILES += userfaultfd
13BINARIES += mlock-random-test 13TEST_GEN_FILES += mlock-random-test
14 14
15all: $(BINARIES)
16%: %.c 15%: %.c
17 $(CC) $(CFLAGS) -o $@ $^ -lrt 16 $(CC) $(CFLAGS) -o $@ $^ -lrt
18userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h 17userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h
@@ -25,9 +24,6 @@ mlock-random-test: mlock-random-test.c
25 make -C ../../../.. headers_install 24 make -C ../../../.. headers_install
26 25
27TEST_PROGS := run_vmtests 26TEST_PROGS := run_vmtests
28TEST_FILES := $(BINARIES)
29 27
30include ../lib.mk 28include ../lib.mk
31 29
32clean:
33 $(RM) $(BINARIES)