Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220196 > unrolled thread

[PATCH v2 5/6] selftests: change install command to rsync

Started byBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
First post2015-09-07 16:10 +0200
Last post2015-09-08 11:50 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 5/6] selftests: change install command to rsync Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-07 16:10 +0200
    Re: [PATCH v2 5/6] selftests: change install command to rsync Michael Ellerman <mpe@ellerman.id.au> - 2015-09-08 08:00 +0200
      Re: [PATCH v2 5/6] selftests: change install command to rsync Bamvor Zhang Jian <bamvor.zhangjian@linaro.org> - 2015-09-08 11:30 +0200
        Re: [PATCH v2 5/6] selftests: change install command to rsync Michael Ellerman <mpe@ellerman.id.au> - 2015-09-08 11:40 +0200
          Re: [PATCH v2 5/6] selftests: change install command to rsync Bamvor Zhang Jian <bamvor.zhangjian@linaro.org> - 2015-09-08 11:50 +0200

#1220196 — [PATCH v2 5/6] selftests: change install command to rsync

FromBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Date2015-09-07 16:10 +0200
Subject[PATCH v2 5/6] selftests: change install command to rsync
Message-ID<q65hp-7Mu-35@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1220495

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-09-08 08:00 +0200
Message-ID<q6k6J-3KE-1@gated-at.bofh.it>
In reply to#1220196
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220636

FromBamvor Zhang Jian <bamvor.zhangjian@linaro.org>
Date2015-09-08 11:30 +0200
Message-ID<q6nnY-72-11@gated-at.bofh.it>
In reply to#1220495
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
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220649

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-09-08 11:40 +0200
Message-ID<q6nxE-ij-39@gated-at.bofh.it>
In reply to#1220636
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220657

FromBamvor Zhang Jian <bamvor.zhangjian@linaro.org>
Date2015-09-08 11:50 +0200
Message-ID<q6nHj-tV-19@gated-at.bofh.it>
In reply to#1220649
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
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web