-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
bamvor.zhangjian@huawei.com
authored and
Shuah Khan
committed
Jan 5, 2017
1 parent
7ce7d89
commit 88baa78
Showing
37 changed files
with
118 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
CFLAGS += -Wall -O2 -I../../../../usr/include | ||
|
||
test_objs = test_verifier test_maps test_lru_map | ||
TEST_GEN_PROGS = test_verifier test_maps test_lru_map | ||
|
||
TEST_PROGS := test_verifier test_maps test_lru_map test_kmod.sh | ||
TEST_FILES := $(test_objs) | ||
|
||
all: $(test_objs) | ||
TEST_PROGS := test_kmod.sh | ||
|
||
include ../lib.mk | ||
|
||
clean: | ||
$(RM) $(test_objs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
TEST_FILES := validate_cap | ||
TEST_PROGS := test_execve | ||
|
||
BINARIES := $(TEST_FILES) $(TEST_PROGS) | ||
TEST_GEN_FILES := validate_cap | ||
TEST_GEN_PROGS := test_execve | ||
|
||
CFLAGS += -O2 -g -std=gnu99 -Wall | ||
LDLIBS += -lcap-ng -lrt -ldl | ||
|
||
all: $(BINARIES) | ||
|
||
clean: | ||
$(RM) $(BINARIES) | ||
|
||
include ../lib.mk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
CFLAGS = -Wall | ||
|
||
test_objs = open-unlink create-read | ||
|
||
all: $(test_objs) | ||
|
||
TEST_GEN_FILES := open-unlink create-read | ||
TEST_PROGS := efivarfs.sh | ||
TEST_FILES := $(test_objs) | ||
|
||
include ../lib.mk | ||
|
||
clean: | ||
rm -f $(test_objs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
CFLAGS += -I../../../../usr/include/ | ||
|
||
all: kcmp_test | ||
|
||
TEST_PROGS := kcmp_test | ||
TEST_GEN_PROGS := kcmp_test | ||
|
||
include ../lib.mk | ||
|
||
clean: | ||
$(RM) kcmp_test kcmp-test-file | ||
$(RM) $(TEST_GEN_PROGS) kcmp-test-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
CFLAGS += -g -I../../../../usr/include/ | ||
|
||
TEST_PROGS := membarrier_test | ||
|
||
all: $(TEST_PROGS) | ||
TEST_GEN_PROGS := membarrier_test | ||
|
||
include ../lib.mk | ||
|
||
clean: | ||
$(RM) $(TEST_PROGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
TEST_PROGS := owner pidns | ||
TEST_GEN_PROGS := owner pidns | ||
|
||
CFLAGS := -Wall -Werror | ||
|
||
all: owner pidns | ||
owner: owner.c | ||
pidns: pidns.c | ||
|
||
clean: | ||
$(RM) owner pidns | ||
|
||
include ../lib.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
TEST_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned | ||
|
||
all: $(TEST_PROGS) | ||
|
||
$(TEST_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c | ||
TEST_GEN_PROGS := copy_unaligned copy_first_unaligned paste_unaligned paste_last_unaligned | ||
|
||
include ../../lib.mk | ||
|
||
clean: | ||
rm -f $(TEST_PROGS) | ||
$(TEST_GEN_PROGS): ../harness.c ../utils.c copy_paste_unaligned_common.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
TEST_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall | ||
TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall | ||
|
||
CFLAGS += -O2 | ||
|
||
all: $(TEST_PROGS) | ||
$(TEST_GEN_PROGS): ../harness.c | ||
|
||
$(TEST_PROGS): ../harness.c | ||
include ../../lib.mk | ||
|
||
context_switch: ../utils.c | ||
context_switch: CFLAGS += -maltivec -mvsx -mabi=altivec | ||
context_switch: LDLIBS += -lpthread | ||
|
||
include ../../lib.mk | ||
|
||
clean: | ||
rm -f $(TEST_PROGS) *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
TEST_PROGS := cp_abort | ||
|
||
all: $(TEST_PROGS) | ||
|
||
$(TEST_PROGS): ../harness.c ../utils.c | ||
TEST_GEN_PROGS := cp_abort | ||
|
||
include ../../lib.mk | ||
|
||
clean: | ||
rm -f $(TEST_PROGS) | ||
$(TEST_GEN_PROGS): ../harness.c ../utils.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.