Re: [PATCH] kselftest: using built-in rule when delete file
On 2015/9/25 23:44, Darren Hart wrote: > On Thu, Sep 24, 2015 at 12:07:47PM +1000, Michael Ellerman wrote: >> On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: >>> On 2015/9/24 9:46, Michael Ellerman wrote: On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > Use make's built-in rules to when delete a file > or delete files. It's not a built-in rule, it's a variable. >>> >>> Sorry,I did not describe clearly. It is a variable used as >>> name of program in built-in rules. >>> Personally I think using rm directly is clearer, but I guess this is fine. Do you actually want to override $RM ? >>> >>> So far, I do not want to override $(RM). But I found that some test's >>> Makefile >>> using *$(RM)* while the other's using *rm -f*, I think it is better to use >>> one >>> of them in all unit tests. > > Agreed, consistency is good. > >>> >>> Do you think which one is better? >> >> I prefer just using rm -f, because it's less magic, everyone knows what it >> does. >> > > Also agreed, it's explicit and perfectly functional. > Ok, thanks, I will send another patch to replace $(RM) with "rm -f". Best Regards Wang Long -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On 2015/9/25 23:44, Darren Hart wrote: > On Thu, Sep 24, 2015 at 12:07:47PM +1000, Michael Ellerman wrote: >> On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: >>> On 2015/9/24 9:46, Michael Ellerman wrote: On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > Use make's built-in rules to when delete a file > or delete files. It's not a built-in rule, it's a variable. >>> >>> Sorry,I did not describe clearly. It is a variable used as >>> name of program in built-in rules. >>> Personally I think using rm directly is clearer, but I guess this is fine. Do you actually want to override $RM ? >>> >>> So far, I do not want to override $(RM). But I found that some test's >>> Makefile >>> using *$(RM)* while the other's using *rm -f*, I think it is better to use >>> one >>> of them in all unit tests. > > Agreed, consistency is good. > >>> >>> Do you think which one is better? >> >> I prefer just using rm -f, because it's less magic, everyone knows what it >> does. >> > > Also agreed, it's explicit and perfectly functional. > Ok, thanks, I will send another patch to replace $(RM) with "rm -f". Best Regards Wang Long -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On Thu, Sep 24, 2015 at 12:07:47PM +1000, Michael Ellerman wrote: > On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: > > On 2015/9/24 9:46, Michael Ellerman wrote: > > > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > > >> Use make's built-in rules to when delete a file > > >> or delete files. > > > > > > It's not a built-in rule, it's a variable. > > > > Sorry,I did not describe clearly. It is a variable used as > > name of program in built-in rules. > > > > > Personally I think using rm directly is clearer, but I guess this is > > > fine. Do > > > you actually want to override $RM ? > > > > So far, I do not want to override $(RM). But I found that some test's > > Makefile > > using *$(RM)* while the other's using *rm -f*, I think it is better to use > > one > > of them in all unit tests. Agreed, consistency is good. > > > > Do you think which one is better? > > I prefer just using rm -f, because it's less magic, everyone knows what it > does. > Also agreed, it's explicit and perfectly functional. -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On Thu, Sep 24, 2015 at 12:07:47PM +1000, Michael Ellerman wrote: > On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: > > On 2015/9/24 9:46, Michael Ellerman wrote: > > > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > > >> Use make's built-in rules to when delete a file > > >> or delete files. > > > > > > It's not a built-in rule, it's a variable. > > > > Sorry,I did not describe clearly. It is a variable used as > > name of program in built-in rules. > > > > > Personally I think using rm directly is clearer, but I guess this is > > > fine. Do > > > you actually want to override $RM ? > > > > So far, I do not want to override $(RM). But I found that some test's > > Makefile > > using *$(RM)* while the other's using *rm -f*, I think it is better to use > > one > > of them in all unit tests. Agreed, consistency is good. > > > > Do you think which one is better? > > I prefer just using rm -f, because it's less magic, everyone knows what it > does. > Also agreed, it's explicit and perfectly functional. -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On 2015/9/24 9:46, Michael Ellerman wrote: > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: >> Use make's built-in rules to when delete a file >> or delete files. > > It's not a built-in rule, it's a variable. Sorry,I did not describe clearly. It is a variable used as name of program in built-in rules. > > Personally I think using rm directly is clearer, but I guess this is fine. Do > you actually want to override $RM ? > So far, I do not want to override $(RM). But I found that some test's Makefile using *$(RM)* while the other's using *rm -f*, I think it is better to use one of them in all unit tests. Do you think which one is better? Best Regards Wang Long > cheers > > > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: > On 2015/9/24 9:46, Michael Ellerman wrote: > > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > >> Use make's built-in rules to when delete a file > >> or delete files. > > > > It's not a built-in rule, it's a variable. > > Sorry,I did not describe clearly. It is a variable used as > name of program in built-in rules. > > > Personally I think using rm directly is clearer, but I guess this is fine. > > Do > > you actually want to override $RM ? > > So far, I do not want to override $(RM). But I found that some test's Makefile > using *$(RM)* while the other's using *rm -f*, I think it is better to use one > of them in all unit tests. > > Do you think which one is better? I prefer just using rm -f, because it's less magic, everyone knows what it does. cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > Use make's built-in rules to when delete a file > or delete files. It's not a built-in rule, it's a variable. Personally I think using rm directly is clearer, but I guess this is fine. Do you actually want to override $RM ? cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] kselftest: using built-in rule when delete file
Use make's built-in rules to when delete a file or delete files. Signed-off-by: Wang Long --- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Makefile | 2 +- tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/mount/Makefile | 2 +- tools/testing/selftests/mqueue/Makefile| 2 +- tools/testing/selftests/powerpc/Makefile | 2 +- tools/testing/selftests/powerpc/copyloops/Makefile | 2 +- tools/testing/selftests/powerpc/dscr/Makefile | 2 +- tools/testing/selftests/powerpc/mm/Makefile| 2 +- tools/testing/selftests/powerpc/pmu/Makefile | 2 +- tools/testing/selftests/powerpc/pmu/ebb/Makefile | 2 +- tools/testing/selftests/powerpc/primitives/Makefile| 2 +- tools/testing/selftests/powerpc/stringloops/Makefile | 2 +- tools/testing/selftests/powerpc/switch_endian/Makefile | 2 +- tools/testing/selftests/powerpc/tm/Makefile| 2 +- tools/testing/selftests/powerpc/vphn/Makefile | 2 +- tools/testing/selftests/ptrace/Makefile| 2 +- tools/testing/selftests/timers/Makefile| 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile index d27108b..731bd31 100644 --- a/tools/testing/selftests/breakpoints/Makefile +++ b/tools/testing/selftests/breakpoints/Makefile @@ -11,4 +11,4 @@ all: include ../lib.mk clean: - rm -fr breakpoint_test + $(RM) breakpoint_test diff --git a/tools/testing/selftests/efivarfs/Makefile b/tools/testing/selftests/efivarfs/Makefile index 736c3dd..4a1c629 100644 --- a/tools/testing/selftests/efivarfs/Makefile +++ b/tools/testing/selftests/efivarfs/Makefile @@ -10,4 +10,4 @@ TEST_FILES := $(test_objs) include ../lib.mk clean: - rm -f $(test_objs) + $(RM) $(test_objs) diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index 9d6b75e..391d328 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -22,4 +22,4 @@ $(TARGETS): $(HEADERS) include ../../lib.mk clean: - rm -f $(TARGETS) + $(RM) $(TARGETS) diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile index 25d2e70..071a706 100644 --- a/tools/testing/selftests/ipc/Makefile +++ b/tools/testing/selftests/ipc/Makefile @@ -19,4 +19,4 @@ TEST_PROGS := msgque_test include ../lib.mk clean: - rm -fr ./msgque_test + $(RM) ./msgque_test diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile index 5e35c9c..9629382 100644 --- a/tools/testing/selftests/mount/Makefile +++ b/tools/testing/selftests/mount/Makefile @@ -18,4 +18,4 @@ override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ override EMIT_TESTS := echo "$(RUN_TESTS)" clean: - rm -f unprivileged-remount-test + $(RM) unprivileged-remount-test diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile index eebac29..d61b987 100644 --- a/tools/testing/selftests/mqueue/Makefile +++ b/tools/testing/selftests/mqueue/Makefile @@ -17,4 +17,4 @@ override define EMIT_TESTS endef clean: - rm -f mq_open_tests mq_perf_tests + $(RM) mq_open_tests mq_perf_tests diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 03ca2e6..91aa06d 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile @@ -45,7 +45,7 @@ clean: @for TARGET in $(SUB_DIRS); do \ $(MAKE) -C $$TARGET clean; \ done; - rm -f tags + $(RM) tags tags: find . -name '*.c' -o -name '*.h' | xargs ctags diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile index 384843e..28d6d6c 100644 --- a/tools/testing/selftests/powerpc/copyloops/Makefile +++ b/tools/testing/selftests/powerpc/copyloops/Makefile @@ -22,4 +22,4 @@ $(TEST_PROGS): $(EXTRA_SOURCES) include ../../lib.mk clean: - rm -f $(TEST_PROGS) *.o + $(RM) $(TEST_PROGS) *.o diff --git a/tools/testing/selftests/powerpc/dscr/Makefile b/tools/testing/selftests/powerpc/dscr/Makefile index 49327ee..d32a66e 100644 --- a/tools/testing/selftests/powerpc/dscr/Makefile +++ b/tools/testing/selftests/powerpc/dscr/Makefile @@ -11,4 +11,4 @@ $(TEST_PROGS): ../harness.c include ../../lib.mk clean: - rm -f $(TEST_PROGS) *.o + $(RM) $(TEST_PROGS) *.o diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile index ee179e2..7f63469 100644 --- a/tools/testing/selftests/powerpc/mm/Makefile +++
[PATCH] kselftest: using built-in rule when delete file
Use make's built-in rules to when delete a file or delete files. Signed-off-by: Wang Long--- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Makefile | 2 +- tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/mount/Makefile | 2 +- tools/testing/selftests/mqueue/Makefile| 2 +- tools/testing/selftests/powerpc/Makefile | 2 +- tools/testing/selftests/powerpc/copyloops/Makefile | 2 +- tools/testing/selftests/powerpc/dscr/Makefile | 2 +- tools/testing/selftests/powerpc/mm/Makefile| 2 +- tools/testing/selftests/powerpc/pmu/Makefile | 2 +- tools/testing/selftests/powerpc/pmu/ebb/Makefile | 2 +- tools/testing/selftests/powerpc/primitives/Makefile| 2 +- tools/testing/selftests/powerpc/stringloops/Makefile | 2 +- tools/testing/selftests/powerpc/switch_endian/Makefile | 2 +- tools/testing/selftests/powerpc/tm/Makefile| 2 +- tools/testing/selftests/powerpc/vphn/Makefile | 2 +- tools/testing/selftests/ptrace/Makefile| 2 +- tools/testing/selftests/timers/Makefile| 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile index d27108b..731bd31 100644 --- a/tools/testing/selftests/breakpoints/Makefile +++ b/tools/testing/selftests/breakpoints/Makefile @@ -11,4 +11,4 @@ all: include ../lib.mk clean: - rm -fr breakpoint_test + $(RM) breakpoint_test diff --git a/tools/testing/selftests/efivarfs/Makefile b/tools/testing/selftests/efivarfs/Makefile index 736c3dd..4a1c629 100644 --- a/tools/testing/selftests/efivarfs/Makefile +++ b/tools/testing/selftests/efivarfs/Makefile @@ -10,4 +10,4 @@ TEST_FILES := $(test_objs) include ../lib.mk clean: - rm -f $(test_objs) + $(RM) $(test_objs) diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index 9d6b75e..391d328 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -22,4 +22,4 @@ $(TARGETS): $(HEADERS) include ../../lib.mk clean: - rm -f $(TARGETS) + $(RM) $(TARGETS) diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile index 25d2e70..071a706 100644 --- a/tools/testing/selftests/ipc/Makefile +++ b/tools/testing/selftests/ipc/Makefile @@ -19,4 +19,4 @@ TEST_PROGS := msgque_test include ../lib.mk clean: - rm -fr ./msgque_test + $(RM) ./msgque_test diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile index 5e35c9c..9629382 100644 --- a/tools/testing/selftests/mount/Makefile +++ b/tools/testing/selftests/mount/Makefile @@ -18,4 +18,4 @@ override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ override EMIT_TESTS := echo "$(RUN_TESTS)" clean: - rm -f unprivileged-remount-test + $(RM) unprivileged-remount-test diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile index eebac29..d61b987 100644 --- a/tools/testing/selftests/mqueue/Makefile +++ b/tools/testing/selftests/mqueue/Makefile @@ -17,4 +17,4 @@ override define EMIT_TESTS endef clean: - rm -f mq_open_tests mq_perf_tests + $(RM) mq_open_tests mq_perf_tests diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 03ca2e6..91aa06d 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile @@ -45,7 +45,7 @@ clean: @for TARGET in $(SUB_DIRS); do \ $(MAKE) -C $$TARGET clean; \ done; - rm -f tags + $(RM) tags tags: find . -name '*.c' -o -name '*.h' | xargs ctags diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile index 384843e..28d6d6c 100644 --- a/tools/testing/selftests/powerpc/copyloops/Makefile +++ b/tools/testing/selftests/powerpc/copyloops/Makefile @@ -22,4 +22,4 @@ $(TEST_PROGS): $(EXTRA_SOURCES) include ../../lib.mk clean: - rm -f $(TEST_PROGS) *.o + $(RM) $(TEST_PROGS) *.o diff --git a/tools/testing/selftests/powerpc/dscr/Makefile b/tools/testing/selftests/powerpc/dscr/Makefile index 49327ee..d32a66e 100644 --- a/tools/testing/selftests/powerpc/dscr/Makefile +++ b/tools/testing/selftests/powerpc/dscr/Makefile @@ -11,4 +11,4 @@ $(TEST_PROGS): ../harness.c include ../../lib.mk clean: - rm -f $(TEST_PROGS) *.o + $(RM) $(TEST_PROGS) *.o diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile index ee179e2..7f63469 100644 ---
Re: [PATCH] kselftest: using built-in rule when delete file
On Thu, 2015-09-24 at 10:05 +0800, long.wanglong wrote: > On 2015/9/24 9:46, Michael Ellerman wrote: > > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > >> Use make's built-in rules to when delete a file > >> or delete files. > > > > It's not a built-in rule, it's a variable. > > Sorry,I did not describe clearly. It is a variable used as > name of program in built-in rules. > > > Personally I think using rm directly is clearer, but I guess this is fine. > > Do > > you actually want to override $RM ? > > So far, I do not want to override $(RM). But I found that some test's Makefile > using *$(RM)* while the other's using *rm -f*, I think it is better to use one > of them in all unit tests. > > Do you think which one is better? I prefer just using rm -f, because it's less magic, everyone knows what it does. cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On 2015/9/24 9:46, Michael Ellerman wrote: > On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: >> Use make's built-in rules to when delete a file >> or delete files. > > It's not a built-in rule, it's a variable. Sorry,I did not describe clearly. It is a variable used as name of program in built-in rules. > > Personally I think using rm directly is clearer, but I guess this is fine. Do > you actually want to override $RM ? > So far, I do not want to override $(RM). But I found that some test's Makefile using *$(RM)* while the other's using *rm -f*, I think it is better to use one of them in all unit tests. Do you think which one is better? Best Regards Wang Long > cheers > > > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kselftest: using built-in rule when delete file
On Wed, 2015-09-23 at 09:40 +, Wang Long wrote: > Use make's built-in rules to when delete a file > or delete files. It's not a built-in rule, it's a variable. Personally I think using rm directly is clearer, but I guess this is fine. Do you actually want to override $RM ? cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/