* [PATCH v2 1/6] selftests: rename jump label to static_keys
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:39 ` Michael Ellerman
2015-09-07 14:04 ` [PATCH v2 2/6] selftests: only compile userfaultfd for x86 and powperpc Bamvor Jian Zhang
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
commit "2bf9e0a locking/static_keys: Provide a selftest" rename
jump_label directory to static_keys.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index ac40ec9..8922c21 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -17,12 +17,12 @@ TARGETS += powerpc
TARGETS += ptrace
TARGETS += seccomp
TARGETS += size
+TARGETS += static_keys
TARGETS += sysctl
ifneq (1, $(quicktest))
TARGETS += timers
endif
TARGETS += user
-TARGETS += jumplabel
TARGETS += vm
TARGETS += x86
TARGETS += zram
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 1/6] selftests: rename jump label to static_keys
2015-09-07 14:04 ` [PATCH v2 1/6] selftests: rename jump label to static_keys Bamvor Jian Zhang
@ 2015-09-08 5:39 ` Michael Ellerman
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 5:39 UTC (permalink / raw)
To: Bamvor Jian Zhang
Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh, peterz,
mingo
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> commit "2bf9e0a locking/static_keys: Provide a selftest" rename
^
d
> jump_label directory to static_keys.
... "and failed to update the Makefile, causing the selftests build to fail.
This commit fixes it by updating the Makefile with the new name and also moves
the entry into the correct position to keep the list alphabetically sorted."
Also the proper syntax for quoting a commit is:
Commit 2bf9e0ab08c6 ("locking/static_keys: Provide a selftest")
And ideally you also include a line saying:
Fixes: 2bf9e0ab08c6 ("locking/static_keys: Provide a selftest")
> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
> ---
> tools/testing/selftests/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index ac40ec9..8922c21 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -17,12 +17,12 @@ TARGETS += powerpc
> TARGETS += ptrace
> TARGETS += seccomp
> TARGETS += size
> +TARGETS += static_keys
> TARGETS += sysctl
> ifneq (1, $(quicktest))
> TARGETS += timers
> endif
> TARGETS += user
> -TARGETS += jumplabel
> TARGETS += vm
> TARGETS += x86
> TARGETS += zram
Otherwise:
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 2/6] selftests: only compile userfaultfd for x86 and powperpc
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
2015-09-07 14:04 ` [PATCH v2 1/6] selftests: rename jump label to static_keys Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:41 ` Michael Ellerman
2015-09-07 14:04 ` [PATCH v2 3/6] selftests: mqueue: allow extra cflags Bamvor Jian Zhang
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
Check it before compiling to avoid the failure of building and
installation.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/vm/Makefile | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 1dacac8..925a82d 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,5 +1,15 @@
# Makefile for vm selftests
+uname_M := $(shell uname -m 2>/dev/null || echo not)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/)
+
+ifeq ($(ARCH),powerpc)
+support_userfaultfd = yes
+endif
+ifeq ($(ARCH),x86)
+support_userfaultfd = yes
+endif
+
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
BINARIES = compaction_test
BINARIES += hugepage-mmap
@@ -9,7 +19,9 @@ BINARIES += mlock2-tests
BINARIES += on-fault-limit
BINARIES += thuge-gen
BINARIES += transhuge-stress
+ifdef support_userfaultfd
BINARIES += userfaultfd
+endif
all: $(BINARIES)
%: %.c
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 3/6] selftests: mqueue: allow extra cflags
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
2015-09-07 14:04 ` [PATCH v2 1/6] selftests: rename jump label to static_keys Bamvor Jian Zhang
2015-09-07 14:04 ` [PATCH v2 2/6] selftests: only compile userfaultfd for x86 and powperpc Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:44 ` Michael Ellerman
2015-09-07 14:04 ` [PATCH v2 4/6] selftests: mqueue: simpification the Makefile Bamvor Jian Zhang
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
change from = to += in order to pass the proper headers and librareis
(popt.h and libpopt.so) in order to build successful in cross
compiling.
Suggested-by: Michael Ellermani <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/mqueue/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 0e3b41e..ca8327f 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -O2
+CFLAGS += -O2
all:
$(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 3/6] selftests: mqueue: allow extra cflags
2015-09-07 14:04 ` [PATCH v2 3/6] selftests: mqueue: allow extra cflags Bamvor Jian Zhang
@ 2015-09-08 5:44 ` Michael Ellerman
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 5:44 UTC (permalink / raw)
To: Bamvor Jian Zhang; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> change from = to += in order to pass the proper headers and librareis
Please start your changelogs with a Capital letter, they are supposed to be
proper English sentences.
> (popt.h and libpopt.so) in order to build successful in cross
> compiling.
Yeah. More generally it allows the user to pass whatever CFLAGS they wish,
which is a good feature.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 4/6] selftests: mqueue: simpification the Makefile
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
` (2 preceding siblings ...)
2015-09-07 14:04 ` [PATCH v2 3/6] selftests: mqueue: allow extra cflags Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:47 ` Michael Ellerman
2015-09-07 14:04 ` [PATCH v2 5/6] selftests: change install command to rsync Bamvor Jian Zhang
2015-09-07 14:04 ` [PATCH v2 6/6] selftests: exec: simpification the Makefile Bamvor Jian Zhang
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
Suggested-by: Michael Ellermani <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/mqueue/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index ca8327f..9f51aaa 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,8 +1,7 @@
CFLAGS += -O2
+LDLIBS = -lrt -lpthread -lpopt
-all:
- $(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt
- $(CC) $(CFLAGS) -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt
+all: mq_open_tests mq_perf_tests
include ../lib.mk
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 4/6] selftests: mqueue: simpification the Makefile
2015-09-07 14:04 ` [PATCH v2 4/6] selftests: mqueue: simpification the Makefile Bamvor Jian Zhang
@ 2015-09-08 5:47 ` Michael Ellerman
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 5:47 UTC (permalink / raw)
To: Bamvor Jian Zhang; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> selftests: mqueue: simpification the Makefile
This should be:
selftests/mqueue: Simplify the Makefile
And please write a change log, even for simple commits like this.
You can say something like:
Use make's implict rule for building simple C programs.
> Suggested-by: Michael Ellermani <mpe@ellerman.id.au>
> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
> ---
> tools/testing/selftests/mqueue/Makefile | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
> index ca8327f..9f51aaa 100644
> --- a/tools/testing/selftests/mqueue/Makefile
> +++ b/tools/testing/selftests/mqueue/Makefile
> @@ -1,8 +1,7 @@
> CFLAGS += -O2
> +LDLIBS = -lrt -lpthread -lpopt
Please move the TEST_PROGS line here:
TEST_PROGS := mq_open_tests mq_perf_tests
> -all:
> - $(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt
> - $(CC) $(CFLAGS) -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt
> +all: mq_open_tests mq_perf_tests
So this can become:
all: $(TEST_PROGS)
>
> include ../lib.mk
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 5/6] selftests: change install command to rsync
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
` (3 preceding siblings ...)
2015-09-07 14:04 ` [PATCH v2 4/6] selftests: mqueue: simpification the Makefile Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:52 ` Michael Ellerman
2015-09-07 14:04 ` [PATCH v2 6/6] selftests: exec: simpification the Makefile Bamvor Jian Zhang
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
The command of install could not handle the special files in exec
testcases, change the default rule to rsync to fix this.
The result of installation is unchanged after this commit.
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/ftrace/Makefile | 2 +-
tools/testing/selftests/lib.mk | 11 ++++-------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
index 0acbeca..4e6ed13 100644
--- a/tools/testing/selftests/ftrace/Makefile
+++ b/tools/testing/selftests/ftrace/Makefile
@@ -1,7 +1,7 @@
all:
TEST_PROGS := ftracetest
-TEST_DIRS := test.d/
+TEST_DIRS := test.d
include ../lib.mk
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 97f1c67..50a93f5 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -12,13 +12,10 @@ run_tests: all
$(RUN_TESTS)
define INSTALL_RULE
- @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
- mkdir -p $(INSTALL_PATH); \
- for TEST_DIR in $(TEST_DIRS); do \
- cp -r $$TEST_DIR $(INSTALL_PATH); \
- done; \
- echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \
- install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \
+ @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
+ mkdir -p ${INSTALL_PATH}; \
+ echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
+ rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \
fi
endef
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 5/6] selftests: change install command to rsync
2015-09-07 14:04 ` [PATCH v2 5/6] selftests: change install command to rsync Bamvor Jian Zhang
@ 2015-09-08 5:52 ` Michael Ellerman
2015-09-08 9:25 ` Bamvor Zhang Jian
0 siblings, 1 reply; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 5:52 UTC (permalink / raw)
To: Bamvor Jian Zhang; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> The command of install could not handle the special files in exec
> testcases, change the default rule to rsync to fix this.
> The result of installation is unchanged after this commit.
>
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Ah OK, I did suggest it. You never replied to my mail suggesting it though.
I assume you tested it and it worked for all cases?
> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
> index 0acbeca..4e6ed13 100644
> --- a/tools/testing/selftests/ftrace/Makefile
> +++ b/tools/testing/selftests/ftrace/Makefile
> @@ -1,7 +1,7 @@
> all:
>
> TEST_PROGS := ftracetest
> -TEST_DIRS := test.d/
> +TEST_DIRS := test.d
>
> include ../lib.mk
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 97f1c67..50a93f5 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -12,13 +12,10 @@ run_tests: all
> $(RUN_TESTS)
>
> define INSTALL_RULE
> - @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
> - mkdir -p $(INSTALL_PATH); \
> - for TEST_DIR in $(TEST_DIRS); do \
> - cp -r $$TEST_DIR $(INSTALL_PATH); \
> - done; \
> - echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \
> - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \
> + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
> + mkdir -p ${INSTALL_PATH}; \
> + echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
What is the echo for?
> + rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \
> fi
> endef
>
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH v2 5/6] selftests: change install command to rsync
2015-09-08 5:52 ` Michael Ellerman
@ 2015-09-08 9:25 ` Bamvor Zhang Jian
2015-09-08 9:39 ` Michael Ellerman
0 siblings, 1 reply; 16+ messages in thread
From: Bamvor Zhang Jian @ 2015-09-08 9:25 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
Hi, Michael
On 09/08/2015 01:52 PM, Michael Ellerman wrote:
> On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
>> The command of install could not handle the special files in exec
>> testcases, change the default rule to rsync to fix this.
>> The result of installation is unchanged after this commit.
>>
>> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
>> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
>
> Ah OK, I did suggest it. You never replied to my mail suggesting it though.
>
> I assume you tested it and it worked for all cases?
yes, I compare the installed file.
>
>> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
>> index 0acbeca..4e6ed13 100644
>> --- a/tools/testing/selftests/ftrace/Makefile
>> +++ b/tools/testing/selftests/ftrace/Makefile
>> @@ -1,7 +1,7 @@
>> all:
>>
>> TEST_PROGS := ftracetest
>> -TEST_DIRS := test.d/
>> +TEST_DIRS := test.d
>>
>> include ../lib.mk
>>
>> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
>> index 97f1c67..50a93f5 100644
>> --- a/tools/testing/selftests/lib.mk
>> +++ b/tools/testing/selftests/lib.mk
>> @@ -12,13 +12,10 @@ run_tests: all
>> $(RUN_TESTS)
>>
>> define INSTALL_RULE
>> - @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
>> - mkdir -p $(INSTALL_PATH); \
>> - for TEST_DIR in $(TEST_DIRS); do \
>> - cp -r $$TEST_DIR $(INSTALL_PATH); \
>> - done; \
>> - echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \
>> - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \
>> + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
>> + mkdir -p ${INSTALL_PATH}; \
>> + echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
>
> What is the echo for?
For output the following rsync command during building.
Do you mean there is some better way to do it?
regards
bamvor
>
>> + rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \
>> fi
>> endef
>>
>
> cheers
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH v2 5/6] selftests: change install command to rsync
2015-09-08 9:25 ` Bamvor Zhang Jian
@ 2015-09-08 9:39 ` Michael Ellerman
2015-09-08 9:40 ` Bamvor Zhang Jian
0 siblings, 1 reply; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 9:39 UTC (permalink / raw)
To: Bamvor Zhang Jian; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
On Tue, 2015-09-08 at 17:25 +0800, Bamvor Zhang Jian wrote:
> Hi, Michael
>
> On 09/08/2015 01:52 PM, Michael Ellerman wrote:
> > On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> >> The command of install could not handle the special files in exec
> >> testcases, change the default rule to rsync to fix this.
> >> The result of installation is unchanged after this commit.
> >>
> >> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> >> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
> >
> > Ah OK, I did suggest it. You never replied to my mail suggesting it though.
> >
> > I assume you tested it and it worked for all cases?
> yes, I compare the installed file.
OK, thanks.
> >> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
> >> index 0acbeca..4e6ed13 100644
> >> --- a/tools/testing/selftests/ftrace/Makefile
> >> +++ b/tools/testing/selftests/ftrace/Makefile
> >> @@ -1,7 +1,7 @@
> >> all:
> >>
> >> TEST_PROGS := ftracetest
> >> -TEST_DIRS := test.d/
> >> +TEST_DIRS := test.d
> >>
> >> include ../lib.mk
> >>
> >> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> >> index 97f1c67..50a93f5 100644
> >> --- a/tools/testing/selftests/lib.mk
> >> +++ b/tools/testing/selftests/lib.mk
> >> @@ -12,13 +12,10 @@ run_tests: all
> >> $(RUN_TESTS)
> >>
> >> define INSTALL_RULE
> >> - @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
> >> - mkdir -p $(INSTALL_PATH); \
> >> - for TEST_DIR in $(TEST_DIRS); do \
> >> - cp -r $$TEST_DIR $(INSTALL_PATH); \
> >> - done; \
> >> - echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \
> >> - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \
> >> + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
> >> + mkdir -p ${INSTALL_PATH}; \
> >> + echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
> >
> > What is the echo for?
> For output the following rsync command during building.
> Do you mean there is some better way to do it?
No, I mean we didn't used to do that, until your recent patch. It's just for
logging?
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH v2 5/6] selftests: change install command to rsync
2015-09-08 9:39 ` Michael Ellerman
@ 2015-09-08 9:40 ` Bamvor Zhang Jian
0 siblings, 0 replies; 16+ messages in thread
From: Bamvor Zhang Jian @ 2015-09-08 9:40 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
Hi, Michael
On 09/08/2015 05:39 PM, Michael Ellerman wrote:
> On Tue, 2015-09-08 at 17:25 +0800, Bamvor Zhang Jian wrote:
>> Hi, Michael
>>
>> On 09/08/2015 01:52 PM, Michael Ellerman wrote:
>>> On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
>>>> The command of install could not handle the special files in exec
>>>> testcases, change the default rule to rsync to fix this.
>>>> The result of installation is unchanged after this commit.
>>>>
>>>> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
>>>> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
>>>
>>> Ah OK, I did suggest it. You never replied to my mail suggesting it though.
>>>
>>> I assume you tested it and it worked for all cases?
>
>> yes, I compare the installed file.
>
> OK, thanks.
>
>>>> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
>>>> index 0acbeca..4e6ed13 100644
>>>> --- a/tools/testing/selftests/ftrace/Makefile
>>>> +++ b/tools/testing/selftests/ftrace/Makefile
>>>> @@ -1,7 +1,7 @@
>>>> all:
>>>>
>>>> TEST_PROGS := ftracetest
>>>> -TEST_DIRS := test.d/
>>>> +TEST_DIRS := test.d
>>>>
>>>> include ../lib.mk
>>>>
>>>> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
>>>> index 97f1c67..50a93f5 100644
>>>> --- a/tools/testing/selftests/lib.mk
>>>> +++ b/tools/testing/selftests/lib.mk
>>>> @@ -12,13 +12,10 @@ run_tests: all
>>>> $(RUN_TESTS)
>>>>
>>>> define INSTALL_RULE
>>>> - @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
>>>> - mkdir -p $(INSTALL_PATH); \
>>>> - for TEST_DIR in $(TEST_DIRS); do \
>>>> - cp -r $$TEST_DIR $(INSTALL_PATH); \
>>>> - done; \
>>>> - echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \
>>>> - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \
>>>> + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
>>>> + mkdir -p ${INSTALL_PATH}; \
>>>> + echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \
>>>
>>> What is the echo for?
>
>> For output the following rsync command during building.
>> Do you mean there is some better way to do it?
>
> No, I mean we didn't used to do that, until your recent patch. It's just for
> logging?
No, It will print the installed file before my patch("a7d0f07 selftests: check before install").
regards
bamvor
>
> cheers
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 6/6] selftests: exec: simpification the Makefile
2015-09-07 14:04 [PATCH v2 0/6] kselftest improvement and cleanup Bamvor Jian Zhang
` (4 preceding siblings ...)
2015-09-07 14:04 ` [PATCH v2 5/6] selftests: change install command to rsync Bamvor Jian Zhang
@ 2015-09-07 14:04 ` Bamvor Jian Zhang
2015-09-08 5:57 ` Michael Ellerman
5 siblings, 1 reply; 16+ messages in thread
From: Bamvor Jian Zhang @ 2015-09-07 14:04 UTC (permalink / raw)
To: linux-kernel
Cc: broonie, khilman, tyler.baker, bamvor.zhangjian, shuahkh, mpe
With the previous patch, the installation method change from install
to rsync. There is not no need to create subdir during test, the
default RUN_TESTS is enough.
This patch implicitly revert commit 84cbd9e4 ("selftests/exec: do not
install subdir as it is already created").
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---
tools/testing/selftests/exec/Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index 6b76bfd..4e400eb 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -1,6 +1,6 @@
CFLAGS = -Wall
BINARIES = execveat
-DEPS = execveat.symlink execveat.denatured script
+DEPS = execveat.symlink execveat.denatured script subdir
all: $(BINARIES) $(DEPS)
subdir:
@@ -22,7 +22,5 @@ TEST_FILES := $(DEPS)
include ../lib.mk
-override EMIT_TESTS := echo "mkdir -p subdir; (./execveat && echo \"selftests: execveat [PASS]\") || echo \"selftests: execveat [FAIL]\""
-
clean:
rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*
--
2.1.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 6/6] selftests: exec: simpification the Makefile
2015-09-07 14:04 ` [PATCH v2 6/6] selftests: exec: simpification the Makefile Bamvor Jian Zhang
@ 2015-09-08 5:57 ` Michael Ellerman
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2015-09-08 5:57 UTC (permalink / raw)
To: Bamvor Jian Zhang; +Cc: linux-kernel, broonie, khilman, tyler.baker, shuahkh
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> selftests: exec: simpification the Makefile
Please give us a better subject, ie something like:
selftests/exec: Revert to default emit rule
> With the previous patch, the installation method change from install
> to rsync. There is not no need to create subdir during test, the
^
one too many "not"
> default RUN_TESTS is enough.
^
EMIT_TESTS
>
> This patch implicitly revert commit 84cbd9e4 ("selftests/exec: do not
^
"essentially" would be more accurate I think
> install subdir as it is already created").
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread