Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

bamvor.zhangjian@huawei.com and committed by
Shuah Khan
88baa78d 7ce7d89f

+120 -257
+12
Documentation/kselftest.txt
··· 95 95 96 96 * Don't cause the top-level "make run_tests" to fail if your feature is 97 97 unconfigured. 98 + 99 + Contributing new tests(details) 100 + =============================== 101 + 102 + * Use TEST_GEN_XXX if such binaries or files are generated during 103 + compiling. 104 + TEST_PROGS, TEST_GEN_PROGS mean it is the excutable tested by 105 + default. 106 + TEST_PROGS_EXTENDED, TEST_GEN_PROGS_EXTENDED mean it is the 107 + executable which is not tested by default. 108 + TEST_FILES, TEST_GEN_FILES mean it is the file which is used by 109 + test.
+2 -8
tools/testing/selftests/bpf/Makefile
··· 1 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 6 - TEST_FILES := $(test_objs) 7 - 8 - all: $(test_objs) 5 + TEST_PROGS := test_kmod.sh 9 6 10 7 include ../lib.mk 11 - 12 - clean: 13 - $(RM) $(test_objs)
+3 -7
tools/testing/selftests/breakpoints/Makefile
··· 3 3 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 4 4 5 5 ifeq ($(ARCH),x86) 6 - TEST_PROGS := breakpoint_test 6 + TEST_GEN_PROGS := breakpoint_test 7 7 endif 8 8 ifeq ($(ARCH),aarch64) 9 - TEST_PROGS := breakpoint_test_arm64 9 + TEST_GEN_PROGS := breakpoint_test_arm64 10 10 endif 11 11 12 - TEST_PROGS += step_after_suspend_test 13 - 14 - all: $(TEST_PROGS) 12 + TEST_GEN_PROGS += step_after_suspend_test 15 13 16 14 include ../lib.mk 17 15 18 - clean: 19 - rm -fr breakpoint_test breakpoint_test_arm64 step_after_suspend_test
+2 -9
tools/testing/selftests/capabilities/Makefile
··· 1 - TEST_FILES := validate_cap 2 - TEST_PROGS := test_execve 3 - 4 - BINARIES := $(TEST_FILES) $(TEST_PROGS) 1 + TEST_GEN_FILES := validate_cap 2 + TEST_GEN_PROGS := test_execve 5 3 6 4 CFLAGS += -O2 -g -std=gnu99 -Wall 7 5 LDLIBS += -lcap-ng -lrt -ldl 8 - 9 - all: $(BINARIES) 10 - 11 - clean: 12 - $(RM) $(BINARIES) 13 6 14 7 include ../lib.mk 15 8
+1 -7
tools/testing/selftests/efivarfs/Makefile
··· 1 1 CFLAGS = -Wall 2 2 3 - test_objs = open-unlink create-read 4 - 5 - all: $(test_objs) 6 - 3 + TEST_GEN_FILES := open-unlink create-read 7 4 TEST_PROGS := efivarfs.sh 8 - TEST_FILES := $(test_objs) 9 5 10 6 include ../lib.mk 11 7 12 - clean: 13 - rm -f $(test_objs)
+4 -6
tools/testing/selftests/exec/Makefile
··· 1 1 CFLAGS = -Wall 2 - BINARIES = execveat 3 - DEPS = execveat.symlink execveat.denatured script subdir 4 - all: $(BINARIES) $(DEPS) 5 2 6 3 subdir: 7 4 mkdir -p $@ ··· 14 17 %: %.c 15 18 $(CC) $(CFLAGS) -o $@ $^ 16 19 17 - TEST_PROGS := execveat 20 + TEST_GEN_PROGS := execveat 21 + TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir 18 22 # Makefile is a run-time dependency, since it's accessed by the execveat test 19 - TEST_FILES := $(DEPS) Makefile 23 + TEST_FILES := Makefile 20 24 21 25 include ../lib.mk 22 26 23 27 clean: 24 - rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx* 28 + rm -rf $(TEST_GEN_PROGS) $(TEST_GEN_FILES) subdir.moved execveat.moved xxxxx*
+3 -9
tools/testing/selftests/futex/functional/Makefile
··· 3 3 LDFLAGS := $(LDFLAGS) -pthread -lrt 4 4 5 5 HEADERS := ../include/futextest.h 6 - TARGETS := \ 6 + TEST_GEN_FILES := \ 7 7 futex_wait_timeout \ 8 8 futex_wait_wouldblock \ 9 9 futex_requeue_pi \ ··· 12 12 futex_wait_uninitialized_heap \ 13 13 futex_wait_private_mapped_file 14 14 15 - TEST_PROGS := $(TARGETS) run.sh 16 - 17 - .PHONY: all clean 18 - all: $(TARGETS) 19 - 20 - $(TARGETS): $(HEADERS) 15 + TEST_PROGS := run.sh 21 16 22 17 include ../../lib.mk 23 18 24 - clean: 25 - rm -f $(TARGETS) 19 + $(TEST_GEN_FILES): $(HEADERS)
+1 -6
tools/testing/selftests/ipc/Makefile
··· 11 11 12 12 CFLAGS += -I../../../../usr/include/ 13 13 14 - all: 15 - $(CC) $(CFLAGS) msgque.c -o msgque_test 16 - 17 - TEST_PROGS := msgque_test 14 + TEST_GEN_PROGS := msgque 18 15 19 16 include ../lib.mk 20 17 21 - clean: 22 - rm -fr ./msgque_test
+2 -4
tools/testing/selftests/kcmp/Makefile
··· 1 1 CFLAGS += -I../../../../usr/include/ 2 2 3 - all: kcmp_test 4 - 5 - TEST_PROGS := kcmp_test 3 + TEST_GEN_PROGS := kcmp_test 6 4 7 5 include ../lib.mk 8 6 9 7 clean: 10 - $(RM) kcmp_test kcmp-test-file 8 + $(RM) $(TEST_GEN_PROGS) kcmp-test-file
+14 -4
tools/testing/selftests/lib.mk
··· 3 3 CC := $(CROSS_COMPILE)gcc 4 4 5 5 define RUN_TESTS 6 - @for TEST in $(TEST_PROGS); do \ 6 + @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \ 7 7 (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \ 8 8 done; 9 9 endef ··· 14 14 define INSTALL_RULE 15 15 @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ 16 16 mkdir -p ${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)/; \ 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)/; \ 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 24 fi 20 25 endef 21 26 ··· 32 27 endif 33 28 34 29 define EMIT_TESTS 35 - @for TEST in $(TEST_PROGS); do \ 30 + @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \ 36 31 echo "(./$$TEST && echo \"selftests: $$TEST [PASS]\") || echo \"selftests: $$TEST [FAIL]\""; \ 37 32 done; 38 33 endef 39 34 40 35 emit_tests: 41 36 $(EMIT_TESTS) 37 + 38 + all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) 39 + 40 + clean: 41 + $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) 42 42 43 43 .PHONY: run_tests all clean install emit_tests
+1 -5
tools/testing/selftests/membarrier/Makefile
··· 1 1 CFLAGS += -g -I../../../../usr/include/ 2 2 3 - TEST_PROGS := membarrier_test 4 - 5 - all: $(TEST_PROGS) 3 + TEST_GEN_PROGS := membarrier_test 6 4 7 5 include ../lib.mk 8 6 9 - clean: 10 - $(RM) $(TEST_PROGS)
+3 -11
tools/testing/selftests/memfd/Makefile
··· 4 4 CFLAGS += -I../../../../include/ 5 5 CFLAGS += -I../../../../usr/include/ 6 6 7 - TEST_PROGS := memfd_test 8 - 9 - all: $(TEST_PROGS) 10 - 11 - include ../lib.mk 12 - 13 - build_fuse: fuse_mnt fuse_test 7 + TEST_PROGS := run_fuse_test.sh 8 + TEST_GEN_FILES := memfd_test fuse_mnt fuse_test 14 9 15 10 fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) 16 11 fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) 17 12 18 - run_fuse: build_fuse 19 - @./run_fuse_test.sh || echo "fuse_test: [FAIL]" 13 + include ../lib.mk 20 14 21 - clean: 22 - $(RM) memfd_test fuse_test
+2 -4
tools/testing/selftests/mount/Makefile
··· 1 1 # Makefile for mount selftests. 2 2 CFLAGS = -Wall \ 3 3 -O2 4 - all: unprivileged-remount-test 5 4 6 5 unprivileged-remount-test: unprivileged-remount-test.c 7 6 $(CC) $(CFLAGS) unprivileged-remount-test.c -o unprivileged-remount-test 8 7 8 + TEST_GEN_PROGS := unprivileged-remount-test 9 + 9 10 include ../lib.mk 10 11 11 - TEST_PROGS := unprivileged-remount-test 12 12 override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ 13 13 then \ 14 14 ./unprivileged-remount-test ; \ ··· 17 17 fi 18 18 override EMIT_TESTS := echo "$(RUN_TESTS)" 19 19 20 - clean: 21 - rm -f unprivileged-remount-test
+1 -5
tools/testing/selftests/mqueue/Makefile
··· 1 1 CFLAGS += -O2 2 2 LDLIBS = -lrt -lpthread -lpopt 3 - TEST_PROGS := mq_open_tests mq_perf_tests 4 - 5 - all: $(TEST_PROGS) 3 + TEST_GEN_PROGS := mq_open_tests mq_perf_tests 6 4 7 5 include ../lib.mk 8 6 ··· 14 16 echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\"" 15 17 endef 16 18 17 - clean: 18 - rm -f mq_open_tests mq_perf_tests
+4 -9
tools/testing/selftests/net/Makefile
··· 3 3 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g 4 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 6 reuseport_bpf_numa: LDFLAGS += -lnuma 13 7 %: %.c 14 8 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ 15 9 16 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 16 include ../lib.mk 20 17 21 - clean: 22 - $(RM) $(NET_PROGS)
+1 -8
tools/testing/selftests/nsfs/Makefile
··· 1 - TEST_PROGS := owner pidns 1 + TEST_GEN_PROGS := owner pidns 2 2 3 3 CFLAGS := -Wall -Werror 4 - 5 - all: owner pidns 6 - owner: owner.c 7 - pidns: pidns.c 8 - 9 - clean: 10 - $(RM) owner pidns 11 4 12 5 include ../lib.mk
+2 -7
tools/testing/selftests/powerpc/alignment/Makefile
··· 1 - TEST_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 1 + TEST_GEN_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned 6 2 7 3 include ../../lib.mk 8 4 9 - clean: 10 - rm -f $(TEST_PROGS) 5 + $(TEST_GEN_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c
+3 -8
tools/testing/selftests/powerpc/benchmarks/Makefile
··· 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 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 9 context_switch: ../utils.c 10 10 context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec 11 11 context_switch: LDLIBS += -lpthread 12 - 13 - include ../../lib.mk 14 - 15 - clean: 16 - rm -f $(TEST_PROGS) *.o
+2 -7
tools/testing/selftests/powerpc/context_switch/Makefile
··· 1 - TEST_PROGS := cp_abort 2 - 3 - all: $(TEST_PROGS) 4 - 5 - $(TEST_PROGS): ../harness.c ../utils.c 1 + TEST_GEN_PROGS := cp_abort 6 2 7 3 include ../../lib.mk 8 4 9 - clean: 10 - rm -f $(TEST_PROGS) 5 + $(TEST_GEN_PROGS): ../harness.c ../utils.c
+3 -8
tools/testing/selftests/powerpc/copyloops/Makefile
··· 7 7 # Use our CFLAGS for the implicit .S rule 8 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 11 EXTRA_SOURCES := validate.c ../harness.c 12 12 13 - all: $(TEST_PROGS) 13 + include ../../lib.mk 14 14 15 15 copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base 16 16 copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7 17 17 memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy 18 18 memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7 19 19 20 - $(TEST_PROGS): $(EXTRA_SOURCES) 21 - 22 - include ../../lib.mk 23 - 24 - clean: 25 - rm -f $(TEST_PROGS) *.o 20 + $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
+4 -9
tools/testing/selftests/powerpc/dscr/Makefile
··· 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 2 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \ 3 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 5 include ../../lib.mk 12 6 13 - clean: 14 - rm -f $(TEST_PROGS) *.o 7 + dscr_default_test: LDLIBS += -lpthread 8 + 9 + $(TEST_GEN_PROGS): ../harness.c
+4 -9
tools/testing/selftests/powerpc/math/Makefile
··· 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 6 - $(TEST_PROGS): CFLAGS += -O2 -g -pthread -m64 -maltivec 5 + $(TEST_GEN_PROGS): ../harness.c 6 + $(TEST_GEN_PROGS): CFLAGS += -O2 -g -pthread -m64 -maltivec 7 7 8 8 fpu_syscall: fpu_asm.S 9 9 fpu_preempt: fpu_asm.S ··· 15 15 16 16 vsx_preempt: CFLAGS += -mvsx 17 17 vsx_preempt: vsx_asm.S 18 - 19 - include ../../lib.mk 20 - 21 - clean: 22 - rm -f $(TEST_PROGS) *.o
+6 -10
tools/testing/selftests/powerpc/mm/Makefile
··· 1 1 noarg: 2 2 $(MAKE) -C ../ 3 3 4 - TEST_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao 5 - TEST_FILES := tempfile 6 - 7 - all: $(TEST_PROGS) $(TEST_FILES) 8 - 9 - $(TEST_PROGS): ../harness.c 10 - 11 - prot_sao: ../utils.c 4 + TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao 5 + TEST_GEN_FILES := tempfile 12 6 13 7 include ../../lib.mk 8 + 9 + $(TEST_GEN_PROGS): ../harness.c 10 + 11 + prot_sao: ../utils.c 14 12 15 13 tempfile: 16 14 dd if=/dev/zero of=tempfile bs=64k count=1 17 15 18 - clean: 19 - rm -f $(TEST_PROGS) tempfile
+6 -6
tools/testing/selftests/powerpc/pmu/Makefile
··· 1 1 noarg: 2 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 5 EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c 6 6 7 - all: $(TEST_PROGS) ebb 7 + include ../../lib.mk 8 8 9 - $(TEST_PROGS): $(EXTRA_SOURCES) 9 + all: $(TEST_GEN_PROGS) ebb 10 + 11 + $(TEST_GEN_PROGS): $(EXTRA_SOURCES) 10 12 11 13 # loop.S can only be built 64-bit 12 14 count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) 13 15 $(CC) $(CFLAGS) -m64 -o $@ $^ 14 16 15 17 per_event_excludes: ../utils.c 16 - 17 - include ../../lib.mk 18 18 19 19 DEFAULT_RUN_TESTS := $(RUN_TESTS) 20 20 override define RUN_TESTS ··· 35 35 endef 36 36 37 37 clean: 38 - rm -f $(TEST_PROGS) loop.o 38 + $(RM) $(TEST_PROGS) loop.o 39 39 $(MAKE) -C ebb clean 40 40 41 41 ebb:
+3 -8
tools/testing/selftests/powerpc/pmu/ebb/Makefile
··· 4 4 # The EBB handler is 64-bit code and everything links against it 5 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 8 cycles_with_freeze_test pmc56_overflow_test \ 9 9 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \ 10 10 cpu_event_pinned_vs_ebb_test task_event_vs_ebb_test \ ··· 16 16 lost_exception_test no_handler_test \ 17 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 22 ebb.c ebb_handler.S trace.c busy_loop.S 23 23 24 24 instruction_count_test: ../loop.S 25 25 26 26 lost_exception_test: ../lib.c 27 - 28 - include ../../../lib.mk 29 - 30 - clean: 31 - rm -f $(TEST_PROGS)
+2 -7
tools/testing/selftests/powerpc/primitives/Makefile
··· 1 1 CFLAGS += -I$(CURDIR) 2 2 3 - TEST_PROGS := load_unaligned_zeropad 4 - 5 - all: $(TEST_PROGS) 6 - 7 - $(TEST_PROGS): ../harness.c 3 + TEST_GEN_PROGS := load_unaligned_zeropad 8 4 9 5 include ../../lib.mk 10 6 11 - clean: 12 - rm -f $(TEST_PROGS) *.o 7 + $(TEST_GEN_PROGS): ../harness.c
+2 -7
tools/testing/selftests/powerpc/stringloops/Makefile
··· 2 2 CFLAGS += -m64 3 3 CFLAGS += -I$(CURDIR) 4 4 5 - TEST_PROGS := memcmp 5 + TEST_GEN_PROGS := memcmp 6 6 EXTRA_SOURCES := memcmp_64.S ../harness.c 7 - 8 - all: $(TEST_PROGS) 9 - 10 - $(TEST_PROGS): $(EXTRA_SOURCES) 11 7 12 8 include ../../lib.mk 13 9 14 - clean: 15 - rm -f $(TEST_PROGS) *.o 10 + $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
+3 -5
tools/testing/selftests/powerpc/switch_endian/Makefile
··· 1 - TEST_PROGS := switch_endian_test 1 + TEST_GEN_PROGS := switch_endian_test 2 2 3 3 ASFLAGS += -O2 -Wall -g -nostdlib -m64 4 4 5 - all: $(TEST_PROGS) 5 + include ../../lib.mk 6 6 7 7 switch_endian_test: check-reversed.S 8 8 ··· 12 12 check-reversed.S: check-reversed.o 13 13 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@ 14 14 15 - include ../../lib.mk 16 - 17 15 clean: 18 - rm -f $(TEST_PROGS) *.o check-reversed.S 16 + $(RM) $(TEST_GEN_PROGS) *.o check-reversed.S
+2 -7
tools/testing/selftests/powerpc/syscalls/Makefile
··· 1 - TEST_PROGS := ipc_unmuxed 1 + TEST_GEN_PROGS := ipc_unmuxed 2 2 3 3 CFLAGS += -I../../../../../usr/include 4 4 5 - all: $(TEST_PROGS) 6 - 7 - $(TEST_PROGS): ../harness.c 8 - 9 5 include ../../lib.mk 10 6 11 - clean: 12 - rm -f $(TEST_PROGS) *.o 7 + $(TEST_GEN_PROGS): ../harness.c
+3 -8
tools/testing/selftests/powerpc/tm/Makefile
··· 1 1 SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \ 2 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 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 11 CFLAGS += -mhtm 12 12 ··· 16 16 17 17 $(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S 18 18 $(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx 19 - 20 - include ../../lib.mk 21 - 22 - clean: 23 - rm -f $(TEST_PROGS) *.o
+3 -7
tools/testing/selftests/powerpc/vphn/Makefile
··· 1 - TEST_PROGS := test-vphn 1 + TEST_GEN_PROGS := test-vphn 2 2 3 3 CFLAGS += -m64 4 4 5 - all: $(TEST_PROGS) 6 - 7 - $(TEST_PROGS): ../harness.c 8 - 9 5 include ../../lib.mk 10 6 11 - clean: 12 - rm -f $(TEST_PROGS) 7 + $(TEST_GEN_PROGS): ../harness.c 8 +
+1 -7
tools/testing/selftests/ptrace/Makefile
··· 1 1 CFLAGS += -iquote../../../../include/uapi -Wall 2 - peeksiginfo: peeksiginfo.c 3 2 4 - all: peeksiginfo 5 - 6 - clean: 7 - rm -f peeksiginfo 8 - 9 - TEST_PROGS := peeksiginfo 3 + TEST_GEN_PROGS := peeksiginfo 10 4 11 5 include ../lib.mk
+1 -5
tools/testing/selftests/seccomp/Makefile
··· 1 - TEST_PROGS := seccomp_bpf 1 + TEST_GEN_PROGS := seccomp_bpf 2 2 CFLAGS += -Wl,-no-as-needed -Wall 3 3 LDFLAGS += -lpthread 4 4 5 - all: $(TEST_PROGS) 6 - 7 5 include ../lib.mk 8 6 9 - clean: 10 - $(RM) $(TEST_PROGS)
+1 -4
tools/testing/selftests/sigaltstack/Makefile
··· 1 1 CFLAGS = -Wall 2 - BINARIES = sas 3 - all: $(BINARIES) 2 + TEST_GEN_PROGS = sas 4 3 5 4 include ../lib.mk 6 5 7 - clean: 8 - rm -rf $(BINARIES)
+1 -5
tools/testing/selftests/size/Makefile
··· 1 - all: get_size 2 1 3 2 get_size: get_size.c 4 3 $(CC) -static -ffreestanding -nostartfiles -s $< -o $@ 5 4 6 - TEST_PROGS := get_size 5 + TEST_GEN_PROGS := get_size 7 6 8 7 include ../lib.mk 9 - 10 - clean: 11 - $(RM) get_size
+2 -7
tools/testing/selftests/timers/Makefile
··· 5 5 6 6 # these are all "safe" tests that don't modify 7 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 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 12 skew_consistency clocksource-switch leap-a-day \ 13 13 leapcrash set-tai set-2038 set-tz 14 14 15 - bins = $(TEST_PROGS) $(TEST_PROGS_EXTENDED) 16 - 17 - all: ${bins} 18 15 19 16 include ../lib.mk 20 17 ··· 31 34 ./set-tai 32 35 ./set-2038 33 36 34 - clean: 35 - rm -f ${bins}
+10 -14
tools/testing/selftests/vm/Makefile
··· 1 1 # Makefile for vm selftests 2 2 3 3 CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) 4 - BINARIES = compaction_test 5 - BINARIES += hugepage-mmap 6 - BINARIES += hugepage-shm 7 - BINARIES += map_hugetlb 8 - BINARIES += mlock2-tests 9 - BINARIES += on-fault-limit 10 - BINARIES += thuge-gen 11 - BINARIES += transhuge-stress 12 - BINARIES += userfaultfd 13 - BINARIES += mlock-random-test 4 + TEST_GEN_FILES = compaction_test 5 + TEST_GEN_FILES += hugepage-mmap 6 + TEST_GEN_FILES += hugepage-shm 7 + TEST_GEN_FILES += map_hugetlb 8 + TEST_GEN_FILES += mlock2-tests 9 + TEST_GEN_FILES += on-fault-limit 10 + TEST_GEN_FILES += thuge-gen 11 + TEST_GEN_FILES += transhuge-stress 12 + TEST_GEN_FILES += userfaultfd 13 + TEST_GEN_FILES += mlock-random-test 14 14 15 - all: $(BINARIES) 16 15 %: %.c 17 16 $(CC) $(CFLAGS) -o $@ $^ -lrt 18 17 userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h ··· 24 25 make -C ../../../.. headers_install 25 26 26 27 TEST_PROGS := run_vmtests 27 - TEST_FILES := $(BINARIES) 28 28 29 29 include ../lib.mk 30 30 31 - clean: 32 - $(RM) $(BINARIES)