diff options
author | bamvor.zhangjian@huawei.com <bamvor.zhangjian@huawei.com> | 2016-11-29 06:55:47 -0500 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-01-05 15:41:35 -0500 |
commit | 88baa78d1f318e57c7cccbfe55d485befd1ce696 (patch) | |
tree | cb347afb828c352e56c22449dd0b207894f25eba /tools | |
parent | 7ce7d89f48834cefece7804d38fc5d85382edf77 (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')
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 @@ | |||
1 | CFLAGS += -Wall -O2 -I../../../../usr/include | 1 | CFLAGS += -Wall -O2 -I../../../../usr/include |
2 | 2 | ||
3 | test_objs = test_verifier test_maps test_lru_map | 3 | TEST_GEN_PROGS = test_verifier test_maps test_lru_map |
4 | 4 | ||
5 | TEST_PROGS := test_verifier test_maps test_lru_map test_kmod.sh | 5 | TEST_PROGS := test_kmod.sh |
6 | TEST_FILES := $(test_objs) | ||
7 | |||
8 | all: $(test_objs) | ||
9 | 6 | ||
10 | include ../lib.mk | 7 | include ../lib.mk |
11 | |||
12 | clean: | ||
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) | |||
3 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) | 3 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) |
4 | 4 | ||
5 | ifeq ($(ARCH),x86) | 5 | ifeq ($(ARCH),x86) |
6 | TEST_PROGS := breakpoint_test | 6 | TEST_GEN_PROGS := breakpoint_test |
7 | endif | 7 | endif |
8 | ifeq ($(ARCH),aarch64) | 8 | ifeq ($(ARCH),aarch64) |
9 | TEST_PROGS := breakpoint_test_arm64 | 9 | TEST_GEN_PROGS := breakpoint_test_arm64 |
10 | endif | 10 | endif |
11 | 11 | ||
12 | TEST_PROGS += step_after_suspend_test | 12 | TEST_GEN_PROGS += step_after_suspend_test |
13 | |||
14 | all: $(TEST_PROGS) | ||
15 | 13 | ||
16 | include ../lib.mk | 14 | include ../lib.mk |
17 | 15 | ||
18 | clean: | ||
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 @@ | |||
1 | TEST_FILES := validate_cap | 1 | TEST_GEN_FILES := validate_cap |
2 | TEST_PROGS := test_execve | 2 | TEST_GEN_PROGS := test_execve |
3 | |||
4 | BINARIES := $(TEST_FILES) $(TEST_PROGS) | ||
5 | 3 | ||
6 | CFLAGS += -O2 -g -std=gnu99 -Wall | 4 | CFLAGS += -O2 -g -std=gnu99 -Wall |
7 | LDLIBS += -lcap-ng -lrt -ldl | 5 | LDLIBS += -lcap-ng -lrt -ldl |
8 | 6 | ||
9 | all: $(BINARIES) | ||
10 | |||
11 | clean: | ||
12 | $(RM) $(BINARIES) | ||
13 | |||
14 | include ../lib.mk | 7 | include ../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 @@ | |||
1 | CFLAGS = -Wall | 1 | CFLAGS = -Wall |
2 | 2 | ||
3 | test_objs = open-unlink create-read | 3 | TEST_GEN_FILES := open-unlink create-read |
4 | |||
5 | all: $(test_objs) | ||
6 | |||
7 | TEST_PROGS := efivarfs.sh | 4 | TEST_PROGS := efivarfs.sh |
8 | TEST_FILES := $(test_objs) | ||
9 | 5 | ||
10 | include ../lib.mk | 6 | include ../lib.mk |
11 | 7 | ||
12 | clean: | ||
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 @@ | |||
1 | CFLAGS = -Wall | 1 | CFLAGS = -Wall |
2 | BINARIES = execveat | ||
3 | DEPS = execveat.symlink execveat.denatured script subdir | ||
4 | all: $(BINARIES) $(DEPS) | ||
5 | 2 | ||
6 | subdir: | 3 | subdir: |
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 | ||
20 | TEST_PROGS := execveat | 17 | TEST_GEN_PROGS := execveat |
18 | TEST_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 |
22 | TEST_FILES := $(DEPS) Makefile | 20 | TEST_FILES := Makefile |
23 | 21 | ||
24 | include ../lib.mk | 22 | include ../lib.mk |
25 | 23 | ||
26 | clean: | 24 | clean: |
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) | |||
3 | LDFLAGS := $(LDFLAGS) -pthread -lrt | 3 | LDFLAGS := $(LDFLAGS) -pthread -lrt |
4 | 4 | ||
5 | HEADERS := ../include/futextest.h | 5 | HEADERS := ../include/futextest.h |
6 | TARGETS := \ | 6 | TEST_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 | ||
15 | TEST_PROGS := $(TARGETS) run.sh | 15 | TEST_PROGS := run.sh |
16 | |||
17 | .PHONY: all clean | ||
18 | all: $(TARGETS) | ||
19 | |||
20 | $(TARGETS): $(HEADERS) | ||
21 | 16 | ||
22 | include ../../lib.mk | 17 | include ../../lib.mk |
23 | 18 | ||
24 | clean: | 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 | ||
12 | CFLAGS += -I../../../../usr/include/ | 12 | CFLAGS += -I../../../../usr/include/ |
13 | 13 | ||
14 | all: | 14 | TEST_GEN_PROGS := msgque |
15 | $(CC) $(CFLAGS) msgque.c -o msgque_test | ||
16 | |||
17 | TEST_PROGS := msgque_test | ||
18 | 15 | ||
19 | include ../lib.mk | 16 | include ../lib.mk |
20 | 17 | ||
21 | clean: | ||
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 @@ | |||
1 | CFLAGS += -I../../../../usr/include/ | 1 | CFLAGS += -I../../../../usr/include/ |
2 | 2 | ||
3 | all: kcmp_test | 3 | TEST_GEN_PROGS := kcmp_test |
4 | |||
5 | TEST_PROGS := kcmp_test | ||
6 | 4 | ||
7 | include ../lib.mk | 5 | include ../lib.mk |
8 | 6 | ||
9 | clean: | 7 | clean: |
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 @@ | |||
3 | CC := $(CROSS_COMPILE)gcc | 3 | CC := $(CROSS_COMPILE)gcc |
4 | 4 | ||
5 | define RUN_TESTS | 5 | define 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; |
9 | endef | 9 | endef |
@@ -14,8 +14,13 @@ run_tests: all | |||
14 | define INSTALL_RULE | 14 | define 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 |
20 | endef | 25 | endef |
21 | 26 | ||
@@ -27,7 +32,7 @@ else | |||
27 | endif | 32 | endif |
28 | 33 | ||
29 | define EMIT_TESTS | 34 | define 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; |
33 | endef | 38 | endef |
@@ -35,4 +40,9 @@ endef | |||
35 | emit_tests: | 40 | emit_tests: |
36 | $(EMIT_TESTS) | 41 | $(EMIT_TESTS) |
37 | 42 | ||
43 | all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) | ||
44 | |||
45 | clean: | ||
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 @@ | |||
1 | CFLAGS += -g -I../../../../usr/include/ | 1 | CFLAGS += -g -I../../../../usr/include/ |
2 | 2 | ||
3 | TEST_PROGS := membarrier_test | 3 | TEST_GEN_PROGS := membarrier_test |
4 | |||
5 | all: $(TEST_PROGS) | ||
6 | 4 | ||
7 | include ../lib.mk | 5 | include ../lib.mk |
8 | 6 | ||
9 | clean: | ||
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/ | |||
4 | CFLAGS += -I../../../../include/ | 4 | CFLAGS += -I../../../../include/ |
5 | CFLAGS += -I../../../../usr/include/ | 5 | CFLAGS += -I../../../../usr/include/ |
6 | 6 | ||
7 | TEST_PROGS := memfd_test | 7 | TEST_PROGS := run_fuse_test.sh |
8 | 8 | TEST_GEN_FILES := memfd_test fuse_mnt fuse_test | |
9 | all: $(TEST_PROGS) | ||
10 | |||
11 | include ../lib.mk | ||
12 | |||
13 | build_fuse: fuse_mnt fuse_test | ||
14 | 9 | ||
15 | fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) | 10 | fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) |
16 | fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) | 11 | fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) |
17 | 12 | ||
18 | run_fuse: build_fuse | 13 | include ../lib.mk |
19 | @./run_fuse_test.sh || echo "fuse_test: [FAIL]" | ||
20 | 14 | ||
21 | clean: | ||
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. |
2 | CFLAGS = -Wall \ | 2 | CFLAGS = -Wall \ |
3 | -O2 | 3 | -O2 |
4 | all: unprivileged-remount-test | ||
5 | 4 | ||
6 | unprivileged-remount-test: unprivileged-remount-test.c | 5 | unprivileged-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 | ||
8 | TEST_GEN_PROGS := unprivileged-remount-test | ||
9 | |||
9 | include ../lib.mk | 10 | include ../lib.mk |
10 | 11 | ||
11 | TEST_PROGS := unprivileged-remount-test | ||
12 | override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ | 12 | override 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 |
18 | override EMIT_TESTS := echo "$(RUN_TESTS)" | 18 | override EMIT_TESTS := echo "$(RUN_TESTS)" |
19 | 19 | ||
20 | clean: | ||
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 @@ | |||
1 | CFLAGS += -O2 | 1 | CFLAGS += -O2 |
2 | LDLIBS = -lrt -lpthread -lpopt | 2 | LDLIBS = -lrt -lpthread -lpopt |
3 | TEST_PROGS := mq_open_tests mq_perf_tests | 3 | TEST_GEN_PROGS := mq_open_tests mq_perf_tests |
4 | |||
5 | all: $(TEST_PROGS) | ||
6 | 4 | ||
7 | include ../lib.mk | 5 | include ../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]\"" |
17 | endef | 15 | endef |
18 | 16 | ||
19 | clean: | ||
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 @@ | |||
3 | CFLAGS = -Wall -Wl,--no-as-needed -O2 -g | 3 | CFLAGS = -Wall -Wl,--no-as-needed -O2 -g |
4 | CFLAGS += -I../../../../usr/include/ | 4 | CFLAGS += -I../../../../usr/include/ |
5 | 5 | ||
6 | NET_PROGS = socket | ||
7 | NET_PROGS += psock_fanout psock_tpacket | ||
8 | NET_PROGS += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa | ||
9 | NET_PROGS += reuseport_dualstack | ||
10 | |||
11 | all: $(NET_PROGS) | ||
12 | reuseport_bpf_numa: LDFLAGS += -lnuma | 6 | reuseport_bpf_numa: LDFLAGS += -lnuma |
13 | %: %.c | 7 | %: %.c |
14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ | 8 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ |
15 | 9 | ||
16 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh | 10 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh |
17 | TEST_FILES := $(NET_PROGS) | 11 | TEST_GEN_FILES = socket |
12 | TEST_GEN_FILES += psock_fanout psock_tpacket | ||
13 | TEST_GEN_FILES += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa | ||
14 | TEST_GEN_FILES += reuseport_dualstack | ||
18 | 15 | ||
19 | include ../lib.mk | 16 | include ../lib.mk |
20 | 17 | ||
21 | clean: | ||
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 @@ | |||
1 | TEST_PROGS := owner pidns | 1 | TEST_GEN_PROGS := owner pidns |
2 | 2 | ||
3 | CFLAGS := -Wall -Werror | 3 | CFLAGS := -Wall -Werror |
4 | 4 | ||
5 | all: owner pidns | ||
6 | owner: owner.c | ||
7 | pidns: pidns.c | ||
8 | |||
9 | clean: | ||
10 | $(RM) owner pidns | ||
11 | |||
12 | include ../lib.mk | 5 | include ../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 @@ | |||
1 | TEST_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned | 1 | TEST_GEN_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned |
2 | |||
3 | all: $(TEST_PROGS) | ||
4 | |||
5 | $(TEST_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c | ||
6 | 2 | ||
7 | include ../../lib.mk | 3 | include ../../lib.mk |
8 | 4 | ||
9 | clean: | 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 @@ | |||
1 | TEST_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall | 1 | TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall |
2 | 2 | ||
3 | CFLAGS += -O2 | 3 | CFLAGS += -O2 |
4 | 4 | ||
5 | all: $(TEST_PROGS) | 5 | $(TEST_GEN_PROGS): ../harness.c |
6 | 6 | ||
7 | $(TEST_PROGS): ../harness.c | 7 | include ../../lib.mk |
8 | 8 | ||
9 | context_switch: ../utils.c | 9 | context_switch: ../utils.c |
10 | context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec | 10 | context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec |
11 | context_switch: LDLIBS += -lpthread | 11 | context_switch: LDLIBS += -lpthread |
12 | |||
13 | include ../../lib.mk | ||
14 | |||
15 | clean: | ||
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 @@ | |||
1 | TEST_PROGS := cp_abort | 1 | TEST_GEN_PROGS := cp_abort |
2 | |||
3 | all: $(TEST_PROGS) | ||
4 | |||
5 | $(TEST_PROGS): ../harness.c ../utils.c | ||
6 | 2 | ||
7 | include ../../lib.mk | 3 | include ../../lib.mk |
8 | 4 | ||
9 | clean: | 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 |
8 | ASFLAGS = $(CFLAGS) | 8 | ASFLAGS = $(CFLAGS) |
9 | 9 | ||
10 | TEST_PROGS := copyuser_64 copyuser_power7 memcpy_64 memcpy_power7 | 10 | TEST_GEN_PROGS := copyuser_64 copyuser_power7 memcpy_64 memcpy_power7 |
11 | EXTRA_SOURCES := validate.c ../harness.c | 11 | EXTRA_SOURCES := validate.c ../harness.c |
12 | 12 | ||
13 | all: $(TEST_PROGS) | 13 | include ../../lib.mk |
14 | 14 | ||
15 | copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base | 15 | copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base |
16 | copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7 | 16 | copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7 |
17 | memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy | 17 | memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy |
18 | memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7 | 18 | memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7 |
19 | 19 | ||
20 | $(TEST_PROGS): $(EXTRA_SOURCES) | 20 | $(TEST_GEN_PROGS): $(EXTRA_SOURCES) |
21 | |||
22 | include ../../lib.mk | ||
23 | |||
24 | clean: | ||
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 @@ | |||
1 | TEST_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \ | 1 | TEST_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 | ||
5 | dscr_default_test: LDLIBS += -lpthread | ||
6 | |||
7 | all: $(TEST_PROGS) | ||
8 | |||
9 | $(TEST_PROGS): ../harness.c | ||
10 | |||
11 | include ../../lib.mk | 5 | include ../../lib.mk |
12 | 6 | ||
13 | clean: | 7 | dscr_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 @@ | |||
1 | TEST_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt | 1 | TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt |
2 | 2 | ||
3 | all: $(TEST_PROGS) | 3 | include ../../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 | ||
8 | fpu_syscall: fpu_asm.S | 8 | fpu_syscall: fpu_asm.S |
9 | fpu_preempt: fpu_asm.S | 9 | fpu_preempt: fpu_asm.S |
@@ -15,8 +15,3 @@ vmx_signal: vmx_asm.S | |||
15 | 15 | ||
16 | vsx_preempt: CFLAGS += -mvsx | 16 | vsx_preempt: CFLAGS += -mvsx |
17 | vsx_preempt: vsx_asm.S | 17 | vsx_preempt: vsx_asm.S |
18 | |||
19 | include ../../lib.mk | ||
20 | |||
21 | clean: | ||
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 @@ | |||
1 | noarg: | 1 | noarg: |
2 | $(MAKE) -C ../ | 2 | $(MAKE) -C ../ |
3 | 3 | ||
4 | TEST_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao | 4 | TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao |
5 | TEST_FILES := tempfile | 5 | TEST_GEN_FILES := tempfile |
6 | 6 | ||
7 | all: $(TEST_PROGS) $(TEST_FILES) | 7 | include ../../lib.mk |
8 | 8 | ||
9 | $(TEST_PROGS): ../harness.c | 9 | $(TEST_GEN_PROGS): ../harness.c |
10 | 10 | ||
11 | prot_sao: ../utils.c | 11 | prot_sao: ../utils.c |
12 | 12 | ||
13 | include ../../lib.mk | ||
14 | |||
15 | tempfile: | 13 | tempfile: |
16 | dd if=/dev/zero of=tempfile bs=64k count=1 | 14 | dd if=/dev/zero of=tempfile bs=64k count=1 |
17 | 15 | ||
18 | clean: | ||
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 @@ | |||
1 | noarg: | 1 | noarg: |
2 | $(MAKE) -C ../ | 2 | $(MAKE) -C ../ |
3 | 3 | ||
4 | TEST_PROGS := count_instructions l3_bank_test per_event_excludes | 4 | TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes |
5 | EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c | 5 | EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c |
6 | 6 | ||
7 | all: $(TEST_PROGS) ebb | 7 | include ../../lib.mk |
8 | |||
9 | all: $(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 |
12 | count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) | 14 | count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) |
@@ -14,8 +16,6 @@ count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) | |||
14 | 16 | ||
15 | per_event_excludes: ../utils.c | 17 | per_event_excludes: ../utils.c |
16 | 18 | ||
17 | include ../../lib.mk | ||
18 | |||
19 | DEFAULT_RUN_TESTS := $(RUN_TESTS) | 19 | DEFAULT_RUN_TESTS := $(RUN_TESTS) |
20 | override define RUN_TESTS | 20 | override define RUN_TESTS |
21 | $(DEFAULT_RUN_TESTS) | 21 | $(DEFAULT_RUN_TESTS) |
@@ -35,7 +35,7 @@ override define INSTALL_RULE | |||
35 | endef | 35 | endef |
36 | 36 | ||
37 | clean: | 37 | clean: |
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 | ||
41 | ebb: | 41 | ebb: |
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 |
5 | CFLAGS += -m64 | 5 | CFLAGS += -m64 |
6 | 6 | ||
7 | TEST_PROGS := reg_access_test event_attributes_test cycles_test \ | 7 | TEST_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 | ||
19 | all: $(TEST_PROGS) | 19 | include ../../../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 | ||
24 | instruction_count_test: ../loop.S | 24 | instruction_count_test: ../loop.S |
25 | 25 | ||
26 | lost_exception_test: ../lib.c | 26 | lost_exception_test: ../lib.c |
27 | |||
28 | include ../../../lib.mk | ||
29 | |||
30 | clean: | ||
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 @@ | |||
1 | CFLAGS += -I$(CURDIR) | 1 | CFLAGS += -I$(CURDIR) |
2 | 2 | ||
3 | TEST_PROGS := load_unaligned_zeropad | 3 | TEST_GEN_PROGS := load_unaligned_zeropad |
4 | |||
5 | all: $(TEST_PROGS) | ||
6 | |||
7 | $(TEST_PROGS): ../harness.c | ||
8 | 4 | ||
9 | include ../../lib.mk | 5 | include ../../lib.mk |
10 | 6 | ||
11 | clean: | 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 @@ | |||
2 | CFLAGS += -m64 | 2 | CFLAGS += -m64 |
3 | CFLAGS += -I$(CURDIR) | 3 | CFLAGS += -I$(CURDIR) |
4 | 4 | ||
5 | TEST_PROGS := memcmp | 5 | TEST_GEN_PROGS := memcmp |
6 | EXTRA_SOURCES := memcmp_64.S ../harness.c | 6 | EXTRA_SOURCES := memcmp_64.S ../harness.c |
7 | 7 | ||
8 | all: $(TEST_PROGS) | ||
9 | |||
10 | $(TEST_PROGS): $(EXTRA_SOURCES) | ||
11 | |||
12 | include ../../lib.mk | 8 | include ../../lib.mk |
13 | 9 | ||
14 | clean: | 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 @@ | |||
1 | TEST_PROGS := switch_endian_test | 1 | TEST_GEN_PROGS := switch_endian_test |
2 | 2 | ||
3 | ASFLAGS += -O2 -Wall -g -nostdlib -m64 | 3 | ASFLAGS += -O2 -Wall -g -nostdlib -m64 |
4 | 4 | ||
5 | all: $(TEST_PROGS) | 5 | include ../../lib.mk |
6 | 6 | ||
7 | switch_endian_test: check-reversed.S | 7 | switch_endian_test: check-reversed.S |
8 | 8 | ||
@@ -12,7 +12,5 @@ check-reversed.o: check.o | |||
12 | check-reversed.S: check-reversed.o | 12 | check-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 | ||
15 | include ../../lib.mk | ||
16 | |||
17 | clean: | 15 | clean: |
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 @@ | |||
1 | TEST_PROGS := ipc_unmuxed | 1 | TEST_GEN_PROGS := ipc_unmuxed |
2 | 2 | ||
3 | CFLAGS += -I../../../../../usr/include | 3 | CFLAGS += -I../../../../../usr/include |
4 | 4 | ||
5 | all: $(TEST_PROGS) | ||
6 | |||
7 | $(TEST_PROGS): ../harness.c | ||
8 | |||
9 | include ../../lib.mk | 5 | include ../../lib.mk |
10 | 6 | ||
11 | clean: | 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 @@ | |||
1 | SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \ | 1 | SIGNAL_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 | ||
4 | TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \ | 4 | TEST_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 | ||
7 | all: $(TEST_PROGS) | 7 | include ../../lib.mk |
8 | 8 | ||
9 | $(TEST_PROGS): ../harness.c ../utils.c | 9 | $(TEST_GEN_PROGS): ../harness.c ../utils.c |
10 | 10 | ||
11 | CFLAGS += -mhtm | 11 | CFLAGS += -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 | |||
20 | include ../../lib.mk | ||
21 | |||
22 | clean: | ||
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 @@ | |||
1 | TEST_PROGS := test-vphn | 1 | TEST_GEN_PROGS := test-vphn |
2 | 2 | ||
3 | CFLAGS += -m64 | 3 | CFLAGS += -m64 |
4 | 4 | ||
5 | all: $(TEST_PROGS) | ||
6 | |||
7 | $(TEST_PROGS): ../harness.c | ||
8 | |||
9 | include ../../lib.mk | 5 | include ../../lib.mk |
10 | 6 | ||
11 | clean: | 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 @@ | |||
1 | CFLAGS += -iquote../../../../include/uapi -Wall | 1 | CFLAGS += -iquote../../../../include/uapi -Wall |
2 | peeksiginfo: peeksiginfo.c | ||
3 | 2 | ||
4 | all: peeksiginfo | 3 | TEST_GEN_PROGS := peeksiginfo |
5 | |||
6 | clean: | ||
7 | rm -f peeksiginfo | ||
8 | |||
9 | TEST_PROGS := peeksiginfo | ||
10 | 4 | ||
11 | include ../lib.mk | 5 | include ../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 @@ | |||
1 | TEST_PROGS := seccomp_bpf | 1 | TEST_GEN_PROGS := seccomp_bpf |
2 | CFLAGS += -Wl,-no-as-needed -Wall | 2 | CFLAGS += -Wl,-no-as-needed -Wall |
3 | LDFLAGS += -lpthread | 3 | LDFLAGS += -lpthread |
4 | 4 | ||
5 | all: $(TEST_PROGS) | ||
6 | |||
7 | include ../lib.mk | 5 | include ../lib.mk |
8 | 6 | ||
9 | clean: | ||
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 @@ | |||
1 | CFLAGS = -Wall | 1 | CFLAGS = -Wall |
2 | BINARIES = sas | 2 | TEST_GEN_PROGS = sas |
3 | all: $(BINARIES) | ||
4 | 3 | ||
5 | include ../lib.mk | 4 | include ../lib.mk |
6 | 5 | ||
7 | clean: | ||
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 @@ | |||
1 | all: get_size | ||
2 | 1 | ||
3 | get_size: get_size.c | 2 | get_size: get_size.c |
4 | $(CC) -static -ffreestanding -nostartfiles -s $< -o $@ | 3 | $(CC) -static -ffreestanding -nostartfiles -s $< -o $@ |
5 | 4 | ||
6 | TEST_PROGS := get_size | 5 | TEST_GEN_PROGS := get_size |
7 | 6 | ||
8 | include ../lib.mk | 7 | include ../lib.mk |
9 | |||
10 | clean: | ||
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 |
8 | TEST_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ | 8 | TEST_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 | ||
11 | TEST_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ | 11 | TEST_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 | ||
15 | bins = $(TEST_PROGS) $(TEST_PROGS_EXTENDED) | ||
16 | |||
17 | all: ${bins} | ||
18 | 15 | ||
19 | include ../lib.mk | 16 | include ../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 | ||
37 | clean: | ||
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 | ||
3 | CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) | 3 | CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) |
4 | BINARIES = compaction_test | 4 | TEST_GEN_FILES = compaction_test |
5 | BINARIES += hugepage-mmap | 5 | TEST_GEN_FILES += hugepage-mmap |
6 | BINARIES += hugepage-shm | 6 | TEST_GEN_FILES += hugepage-shm |
7 | BINARIES += map_hugetlb | 7 | TEST_GEN_FILES += map_hugetlb |
8 | BINARIES += mlock2-tests | 8 | TEST_GEN_FILES += mlock2-tests |
9 | BINARIES += on-fault-limit | 9 | TEST_GEN_FILES += on-fault-limit |
10 | BINARIES += thuge-gen | 10 | TEST_GEN_FILES += thuge-gen |
11 | BINARIES += transhuge-stress | 11 | TEST_GEN_FILES += transhuge-stress |
12 | BINARIES += userfaultfd | 12 | TEST_GEN_FILES += userfaultfd |
13 | BINARIES += mlock-random-test | 13 | TEST_GEN_FILES += mlock-random-test |
14 | 14 | ||
15 | all: $(BINARIES) | ||
16 | %: %.c | 15 | %: %.c |
17 | $(CC) $(CFLAGS) -o $@ $^ -lrt | 16 | $(CC) $(CFLAGS) -o $@ $^ -lrt |
18 | userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h | 17 | userfaultfd: 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 | ||
27 | TEST_PROGS := run_vmtests | 26 | TEST_PROGS := run_vmtests |
28 | TEST_FILES := $(BINARIES) | ||
29 | 27 | ||
30 | include ../lib.mk | 28 | include ../lib.mk |
31 | 29 | ||
32 | clean: | ||
33 | $(RM) $(BINARIES) | ||