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


Groups > linux.kernel > #1231290 > unrolled thread

[PATCH] kselftest: using built-in rule when delete file

Started byWang Long <long.wanglong@huawei.com>
First post2015-09-23 11:50 +0200
Last post2015-09-24 04:10 +0200
Articles 17 — 9 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kselftest: using built-in rule when delete file Wang Long <long.wanglong@huawei.com> - 2015-09-23 11:50 +0200
    Re: [PATCH] kselftest: using built-in rule when delete file Michael Ellerman <mpe@ellerman.id.au> - 2015-09-24 03:50 +0200
      Re: [PATCH] kselftest: using built-in rule when delete file Michael Ellerman <mpe@ellerman.id.au> - 2015-09-24 04:10 +0200
        Re: [PATCH] kselftest: using built-in rule when delete file Darren Hart <dvhart@infradead.org> - 2015-09-25 17:50 +0200
          Re: [PATCH] kselftest: using built-in rule when delete file "long.wanglong" <long.wanglong@huawei.com> - 2015-09-28 04:10 +0200
          [PATCH] kselftest: replace $(RM) with rm -f command Wang Long <long.wanglong@huawei.com> - 2015-09-28 04:20 +0200
            Re: [PATCH] kselftest: replace $(RM) with rm -f command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-09-28 05:20 +0200
              Re: [PATCH] kselftest: replace $(RM) with rm -f command Cam Hutchison <camh@xdna.net> - 2015-09-28 07:20 +0200
              Re: [PATCH] kselftest: replace $(RM) with rm -f command Michael Ellerman <mpe@ellerman.id.au> - 2015-09-29 12:00 +0200
                [PATCH] kselftest: replace rm -f command with $(RM) Wang Long <long.wanglong@huawei.com> - 2015-09-29 13:30 +0200
                Re: [PATCH] kselftest: replace $(RM) with rm -f command Kees Cook <keescook@chromium.org> - 2015-09-29 19:50 +0200
              Re: [PATCH] kselftest: replace $(RM) with rm -f command Darren Hart <dvhart@infradead.org> - 2015-10-03 06:40 +0200
                Re: [PATCH] kselftest: replace $(RM) with rm -f command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-10-03 16:20 +0200
                  Re: [PATCH] kselftest: replace $(RM) with rm -f command Josh Triplett <josh@joshtriplett.org> - 2015-10-03 20:00 +0200
                    Re: [PATCH] kselftest: replace $(RM) with rm -f command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-10-03 20:10 +0200
            Re: [PATCH] kselftest: replace $(RM) with rm -f command Yuan Sun <sunyuan3@huawei.com> - 2015-09-28 09:40 +0200
      Re: [PATCH] kselftest: using built-in rule when delete file "long.wanglong" <long.wanglong@huawei.com> - 2015-09-24 04:10 +0200

#1231290 — [PATCH] kselftest: using built-in rule when delete file

FromWang Long <long.wanglong@huawei.com>
Date2015-09-23 11:50 +0200
Subject[PATCH] kselftest: using built-in rule when delete file
Message-ID<qbOQx-mP-3@gated-at.bofh.it>
Use make's built-in rules to when delete a file
or delete files.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 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
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -14,4 +14,4 @@ tempfile:
 	dd if=/dev/zero of=tempfile bs=64k count=1
 
 clean:
-	rm -f $(TEST_PROGS) tempfile
+	$(RM) $(TEST_PROGS) tempfile
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
index a9099d9..170f3a6 100644
--- a/tools/testing/selftests/powerpc/pmu/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -33,7 +33,7 @@ override define INSTALL_RULE
 endef
 
 clean:
-	rm -f $(TEST_PROGS) loop.o
+	$(RM) $(TEST_PROGS) loop.o
 	$(MAKE) -C ebb clean
 
 ebb:
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index 5cdc9db..977875f 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -27,4 +27,4 @@ lost_exception_test: ../lib.c
 include ../../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS)
+	$(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/primitives/Makefile b/tools/testing/selftests/powerpc/primitives/Makefile
index b68c622..2261bd1 100644
--- a/tools/testing/selftests/powerpc/primitives/Makefile
+++ b/tools/testing/selftests/powerpc/primitives/Makefile
@@ -9,4 +9,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/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 2a728f4..ea89afd 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -12,4 +12,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/switch_endian/Makefile b/tools/testing/selftests/powerpc/switch_endian/Makefile
index e21d106..6cfe0f0 100644
--- a/tools/testing/selftests/powerpc/switch_endian/Makefile
+++ b/tools/testing/selftests/powerpc/switch_endian/Makefile
@@ -15,4 +15,4 @@ check-reversed.S: check-reversed.o
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS) *.o check-reversed.S
+	$(RM) $(TEST_PROGS) *.o check-reversed.S
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 4bea62a..f04bd4b 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -10,4 +10,4 @@ tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS) *.o
+	$(RM) $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/vphn/Makefile b/tools/testing/selftests/powerpc/vphn/Makefile
index a485f2e..d98f32c 100644
--- a/tools/testing/selftests/powerpc/vphn/Makefile
+++ b/tools/testing/selftests/powerpc/vphn/Makefile
@@ -9,4 +9,4 @@ $(TEST_PROGS): ../harness.c
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS)
+	$(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/ptrace/Makefile b/tools/testing/selftests/ptrace/Makefile
index 453927f..ec5bf58 100644
--- a/tools/testing/selftests/ptrace/Makefile
+++ b/tools/testing/selftests/ptrace/Makefile
@@ -4,7 +4,7 @@ peeksiginfo: peeksiginfo.c
 all: peeksiginfo
 
 clean:
-	rm -f peeksiginfo
+	$(RM) peeksiginfo
 
 TEST_PROGS := peeksiginfo
 
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index 89a3f44..a5889e2 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -33,4 +33,4 @@ run_destructive_tests: run_tests
 	./set-2038
 
 clean:
-	rm -f ${bins}
+	$(RM) ${bins}
-- 
1.8.3.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]


#1231806

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-09-24 03:50 +0200
Message-ID<qc3Pz-5iH-5@gated-at.bofh.it>
In reply to#1231290
On Wed, 2015-09-23 at 09:40 +0000, 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 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]


#1231809

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-09-24 04:10 +0200
Message-ID<qc48V-5Uv-3@gated-at.bofh.it>
In reply to#1231806
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 +0000, 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 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]


#1232898

FromDarren Hart <dvhart@infradead.org>
Date2015-09-25 17:50 +0200
Message-ID<qcDq1-5In-11@gated-at.bofh.it>
In reply to#1231809
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 +0000, 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 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]


#1233816

From"long.wanglong" <long.wanglong@huawei.com>
Date2015-09-28 04:10 +0200
Message-ID<qdw37-a2-3@gated-at.bofh.it>
In reply to#1232898
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 +0000, 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 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]


#1233817 — [PATCH] kselftest: replace $(RM) with rm -f command

FromWang Long <long.wanglong@huawei.com>
Date2015-09-28 04:20 +0200
Subject[PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qdwcN-rx-1@gated-at.bofh.it>
In reply to#1232898
Some test's Makefile using "$(RM)" while the other's
using "rm -f". It is better to use one of them in all
tests.

"rm -f" is better, because it is less magic, and everyone
konws what is does.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 tools/testing/selftests/capabilities/Makefile | 2 +-
 tools/testing/selftests/kcmp/Makefile         | 2 +-
 tools/testing/selftests/membarrier/Makefile   | 2 +-
 tools/testing/selftests/memfd/Makefile        | 2 +-
 tools/testing/selftests/net/Makefile          | 2 +-
 tools/testing/selftests/seccomp/Makefile      | 2 +-
 tools/testing/selftests/size/Makefile         | 2 +-
 tools/testing/selftests/vm/Makefile           | 2 +-
 tools/testing/selftests/x86/Makefile          | 2 +-
 tools/testing/selftests/zram/Makefile         | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile
index 8c8f0c1..dcc1972 100644
--- a/tools/testing/selftests/capabilities/Makefile
+++ b/tools/testing/selftests/capabilities/Makefile
@@ -12,7 +12,7 @@ CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
 all: $(TARGETS)
 
 clean:
-	$(RM) $(TARGETS)
+	rm -f $(TARGETS)
 
 $(TARGETS): %: %.c
 	$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 2ae7450..2deaee0 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -7,4 +7,4 @@ TEST_PROGS := kcmp_test
 include ../lib.mk
 
 clean:
-	$(RM) kcmp_test kcmp-test-file
+	rn -f kcmp_test kcmp-test-file
diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile
index a1a9708..f23fc58 100644
--- a/tools/testing/selftests/membarrier/Makefile
+++ b/tools/testing/selftests/membarrier/Makefile
@@ -7,4 +7,4 @@ all: $(TEST_PROGS)
 include ../lib.mk
 
 clean:
-	$(RM) $(TEST_PROGS)
+	rm -f $(TEST_PROGS)
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index 3e7eb79..068fa93 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -19,4 +19,4 @@ run_fuse: build_fuse
 	@./run_fuse_test.sh || echo "fuse_test: [FAIL]"
 
 clean:
-	$(RM) memfd_test fuse_test
+	rm -f memfd_test fuse_test
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index fac4782..ec7eaa4 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -16,4 +16,4 @@ TEST_FILES := $(NET_PROGS)
 include ../lib.mk
 
 clean:
-	$(RM) $(NET_PROGS)
+	rm -f $(NET_PROGS)
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index 8401e87..c16072a 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -7,4 +7,4 @@ all: $(TEST_PROGS)
 include ../lib.mk
 
 clean:
-	$(RM) $(TEST_PROGS)
+	rm -f $(TEST_PROGS)
diff --git a/tools/testing/selftests/size/Makefile b/tools/testing/selftests/size/Makefile
index bbd0b53..cefe914 100644
--- a/tools/testing/selftests/size/Makefile
+++ b/tools/testing/selftests/size/Makefile
@@ -8,4 +8,4 @@ TEST_PROGS := get_size
 include ../lib.mk
 
 clean:
-	$(RM) get_size
+	rm -f get_size
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 3c53cac..26663c7 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -24,4 +24,4 @@ TEST_FILES := $(BINARIES)
 include ../lib.mk
 
 clean:
-	$(RM) $(BINARIES)
+	rm -f $(BINARIES)
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 29089b2..48b2406 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -32,7 +32,7 @@ all_32: $(BINARIES_32)
 all_64: $(BINARIES_64)
 
 clean:
-	$(RM) $(BINARIES_32) $(BINARIES_64)
+	rm -f $(BINARIES_32) $(BINARIES_64)
 
 $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
 	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
diff --git a/tools/testing/selftests/zram/Makefile b/tools/testing/selftests/zram/Makefile
index 29d8034..e1591c8 100644
--- a/tools/testing/selftests/zram/Makefile
+++ b/tools/testing/selftests/zram/Makefile
@@ -6,4 +6,4 @@ TEST_FILES := zram01.sh zram02.sh zram_lib.sh
 include ../lib.mk
 
 clean:
-	$(RM) err.log
+	rm -f err.log
-- 
1.8.3.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] | [prev] | [next] | [standalone]


#1233828 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2015-09-28 05:20 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qdx8R-1Mj-5@gated-at.bofh.it>
In reply to#1233817
----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:

> Some test's Makefile using "$(RM)" while the other's
> using "rm -f". It is better to use one of them in all
> tests.

I agree that this disparity appears to be unwanted. We
should settle on one or the other.

> 
> "rm -f" is better, because it is less magic, and everyone
> konws what is does.

"$(RM)" is clearly defined as a Makefile implicit variable
which defaults to "rm -f".
Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

Leaving it as a variable is more flexible because then the
default behavior can be overridden if need be, which is
not the case of a hardcoded "rm -f".

Following your line of argumentation, we should then
invoke "gcc" directly in every Makefile because it is
less magic than "$(CC)". This makes no sense.

Thanks,

Mathieu

> 
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
> ---
> tools/testing/selftests/capabilities/Makefile | 2 +-
> tools/testing/selftests/kcmp/Makefile         | 2 +-
> tools/testing/selftests/membarrier/Makefile   | 2 +-
> tools/testing/selftests/memfd/Makefile        | 2 +-
> tools/testing/selftests/net/Makefile          | 2 +-
> tools/testing/selftests/seccomp/Makefile      | 2 +-
> tools/testing/selftests/size/Makefile         | 2 +-
> tools/testing/selftests/vm/Makefile           | 2 +-
> tools/testing/selftests/x86/Makefile          | 2 +-
> tools/testing/selftests/zram/Makefile         | 2 +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/testing/selftests/capabilities/Makefile
> b/tools/testing/selftests/capabilities/Makefile
> index 8c8f0c1..dcc1972 100644
> --- a/tools/testing/selftests/capabilities/Makefile
> +++ b/tools/testing/selftests/capabilities/Makefile
> @@ -12,7 +12,7 @@ CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
> all: $(TARGETS)
> 
> clean:
> -	$(RM) $(TARGETS)
> +	rm -f $(TARGETS)
> 
> $(TARGETS): %: %.c
> 	$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
> diff --git a/tools/testing/selftests/kcmp/Makefile
> b/tools/testing/selftests/kcmp/Makefile
> index 2ae7450..2deaee0 100644
> --- a/tools/testing/selftests/kcmp/Makefile
> +++ b/tools/testing/selftests/kcmp/Makefile
> @@ -7,4 +7,4 @@ TEST_PROGS := kcmp_test
> include ../lib.mk
> 
> clean:
> -	$(RM) kcmp_test kcmp-test-file
> +	rn -f kcmp_test kcmp-test-file
> diff --git a/tools/testing/selftests/membarrier/Makefile
> b/tools/testing/selftests/membarrier/Makefile
> index a1a9708..f23fc58 100644
> --- a/tools/testing/selftests/membarrier/Makefile
> +++ b/tools/testing/selftests/membarrier/Makefile
> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
> include ../lib.mk
> 
> clean:
> -	$(RM) $(TEST_PROGS)
> +	rm -f $(TEST_PROGS)
> diff --git a/tools/testing/selftests/memfd/Makefile
> b/tools/testing/selftests/memfd/Makefile
> index 3e7eb79..068fa93 100644
> --- a/tools/testing/selftests/memfd/Makefile
> +++ b/tools/testing/selftests/memfd/Makefile
> @@ -19,4 +19,4 @@ run_fuse: build_fuse
> 	@./run_fuse_test.sh || echo "fuse_test: [FAIL]"
> 
> clean:
> -	$(RM) memfd_test fuse_test
> +	rm -f memfd_test fuse_test
> diff --git a/tools/testing/selftests/net/Makefile
> b/tools/testing/selftests/net/Makefile
> index fac4782..ec7eaa4 100644
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -16,4 +16,4 @@ TEST_FILES := $(NET_PROGS)
> include ../lib.mk
> 
> clean:
> -	$(RM) $(NET_PROGS)
> +	rm -f $(NET_PROGS)
> diff --git a/tools/testing/selftests/seccomp/Makefile
> b/tools/testing/selftests/seccomp/Makefile
> index 8401e87..c16072a 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
> include ../lib.mk
> 
> clean:
> -	$(RM) $(TEST_PROGS)
> +	rm -f $(TEST_PROGS)
> diff --git a/tools/testing/selftests/size/Makefile
> b/tools/testing/selftests/size/Makefile
> index bbd0b53..cefe914 100644
> --- a/tools/testing/selftests/size/Makefile
> +++ b/tools/testing/selftests/size/Makefile
> @@ -8,4 +8,4 @@ TEST_PROGS := get_size
> include ../lib.mk
> 
> clean:
> -	$(RM) get_size
> +	rm -f get_size
> diff --git a/tools/testing/selftests/vm/Makefile
> b/tools/testing/selftests/vm/Makefile
> index 3c53cac..26663c7 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -24,4 +24,4 @@ TEST_FILES := $(BINARIES)
> include ../lib.mk
> 
> clean:
> -	$(RM) $(BINARIES)
> +	rm -f $(BINARIES)
> diff --git a/tools/testing/selftests/x86/Makefile
> b/tools/testing/selftests/x86/Makefile
> index 29089b2..48b2406 100644
> --- a/tools/testing/selftests/x86/Makefile
> +++ b/tools/testing/selftests/x86/Makefile
> @@ -32,7 +32,7 @@ all_32: $(BINARIES_32)
> all_64: $(BINARIES_64)
> 
> clean:
> -	$(RM) $(BINARIES_32) $(BINARIES_64)
> +	rm -f $(BINARIES_32) $(BINARIES_64)
> 
> $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
> 	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
> diff --git a/tools/testing/selftests/zram/Makefile
> b/tools/testing/selftests/zram/Makefile
> index 29d8034..e1591c8 100644
> --- a/tools/testing/selftests/zram/Makefile
> +++ b/tools/testing/selftests/zram/Makefile
> @@ -6,4 +6,4 @@ TEST_FILES := zram01.sh zram02.sh zram_lib.sh
> include ../lib.mk
> 
> clean:
> -	$(RM) err.log
> +	rm -f err.log
> --
> 1.8.3.4

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
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]


#1233844 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromCam Hutchison <camh@xdna.net>
Date2015-09-28 07:20 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qdz0Z-4uH-5@gated-at.bofh.it>
In reply to#1233828
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:

>----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:

>> Some test's Makefile using "$(RM)" while the other's
>> using "rm -f". It is better to use one of them in all
>> tests.

>I agree that this disparity appears to be unwanted. We
>should settle on one or the other.

>> 
>> "rm -f" is better, because it is less magic, and everyone
>> konws what is does.

>"$(RM)" is clearly defined as a Makefile implicit variable
>which defaults to "rm -f".
>Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

>Leaving it as a variable is more flexible because then the
>default behavior can be overridden if need be, which is
>not the case of a hardcoded "rm -f".

And you're also possibly less likely to get errors like below...

>Following your line of argumentation, we should then
>invoke "gcc" directly in every Makefile because it is
>less magic than "$(CC)". This makes no sense.

>Thanks,

>Mathieu

>> 
>> Signed-off-by: Wang Long <long.wanglong@huawei.com>
>> ---
>> tools/testing/selftests/capabilities/Makefile | 2 +-
>> tools/testing/selftests/kcmp/Makefile         | 2 +-
>> tools/testing/selftests/membarrier/Makefile   | 2 +-
>> tools/testing/selftests/memfd/Makefile        | 2 +-
>> tools/testing/selftests/net/Makefile          | 2 +-
>> tools/testing/selftests/seccomp/Makefile      | 2 +-
>> tools/testing/selftests/size/Makefile         | 2 +-
>> tools/testing/selftests/vm/Makefile           | 2 +-
>> tools/testing/selftests/x86/Makefile          | 2 +-
>> tools/testing/selftests/zram/Makefile         | 2 +-
>> 10 files changed, 10 insertions(+), 10 deletions(-)
>> 
>> diff --git a/tools/testing/selftests/capabilities/Makefile
>> b/tools/testing/selftests/capabilities/Makefile
>> index 8c8f0c1..dcc1972 100644
>> --- a/tools/testing/selftests/capabilities/Makefile
>> +++ b/tools/testing/selftests/capabilities/Makefile
>> @@ -12,7 +12,7 @@ CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
>> all: $(TARGETS)
>> 
>> clean:
>> -	$(RM) $(TARGETS)
>> +	rm -f $(TARGETS)
>> 
>> $(TARGETS): %: %.c
>> 	$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
>> diff --git a/tools/testing/selftests/kcmp/Makefile
>> b/tools/testing/selftests/kcmp/Makefile
>> index 2ae7450..2deaee0 100644
>> --- a/tools/testing/selftests/kcmp/Makefile
>> +++ b/tools/testing/selftests/kcmp/Makefile
>> @@ -7,4 +7,4 @@ TEST_PROGS := kcmp_test
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) kcmp_test kcmp-test-file
>> +	rn -f kcmp_test kcmp-test-file

s/rn/rm/


>> diff --git a/tools/testing/selftests/membarrier/Makefile
>> b/tools/testing/selftests/membarrier/Makefile
>> index a1a9708..f23fc58 100644
>> --- a/tools/testing/selftests/membarrier/Makefile
>> +++ b/tools/testing/selftests/membarrier/Makefile
>> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) $(TEST_PROGS)
>> +	rm -f $(TEST_PROGS)
>> diff --git a/tools/testing/selftests/memfd/Makefile
>> b/tools/testing/selftests/memfd/Makefile
>> index 3e7eb79..068fa93 100644
>> --- a/tools/testing/selftests/memfd/Makefile
>> +++ b/tools/testing/selftests/memfd/Makefile
>> @@ -19,4 +19,4 @@ run_fuse: build_fuse
>> 	@./run_fuse_test.sh || echo "fuse_test: [FAIL]"
>> 
>> clean:
>> -	$(RM) memfd_test fuse_test
>> +	rm -f memfd_test fuse_test
>> diff --git a/tools/testing/selftests/net/Makefile
>> b/tools/testing/selftests/net/Makefile
>> index fac4782..ec7eaa4 100644
>> --- a/tools/testing/selftests/net/Makefile
>> +++ b/tools/testing/selftests/net/Makefile
>> @@ -16,4 +16,4 @@ TEST_FILES := $(NET_PROGS)
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) $(NET_PROGS)
>> +	rm -f $(NET_PROGS)
>> diff --git a/tools/testing/selftests/seccomp/Makefile
>> b/tools/testing/selftests/seccomp/Makefile
>> index 8401e87..c16072a 100644
>> --- a/tools/testing/selftests/seccomp/Makefile
>> +++ b/tools/testing/selftests/seccomp/Makefile
>> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) $(TEST_PROGS)
>> +	rm -f $(TEST_PROGS)
>> diff --git a/tools/testing/selftests/size/Makefile
>> b/tools/testing/selftests/size/Makefile
>> index bbd0b53..cefe914 100644
>> --- a/tools/testing/selftests/size/Makefile
>> +++ b/tools/testing/selftests/size/Makefile
>> @@ -8,4 +8,4 @@ TEST_PROGS := get_size
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) get_size
>> +	rm -f get_size
>> diff --git a/tools/testing/selftests/vm/Makefile
>> b/tools/testing/selftests/vm/Makefile
>> index 3c53cac..26663c7 100644
>> --- a/tools/testing/selftests/vm/Makefile
>> +++ b/tools/testing/selftests/vm/Makefile
>> @@ -24,4 +24,4 @@ TEST_FILES := $(BINARIES)
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) $(BINARIES)
>> +	rm -f $(BINARIES)
>> diff --git a/tools/testing/selftests/x86/Makefile
>> b/tools/testing/selftests/x86/Makefile
>> index 29089b2..48b2406 100644
>> --- a/tools/testing/selftests/x86/Makefile
>> +++ b/tools/testing/selftests/x86/Makefile
>> @@ -32,7 +32,7 @@ all_32: $(BINARIES_32)
>> all_64: $(BINARIES_64)
>> 
>> clean:
>> -	$(RM) $(BINARIES_32) $(BINARIES_64)
>> +	rm -f $(BINARIES_32) $(BINARIES_64)
>> 
>> $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
>> 	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
>> diff --git a/tools/testing/selftests/zram/Makefile
>> b/tools/testing/selftests/zram/Makefile
>> index 29d8034..e1591c8 100644
>> --- a/tools/testing/selftests/zram/Makefile
>> +++ b/tools/testing/selftests/zram/Makefile
>> @@ -6,4 +6,4 @@ TEST_FILES := zram01.sh zram02.sh zram_lib.sh
>> include ../lib.mk
>> 
>> clean:
>> -	$(RM) err.log
>> +	rm -f err.log
>> --
>> 1.8.3.4

>-- 
>Mathieu Desnoyers
>EfficiOS Inc.
>http://www.efficios.com
>--
>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/
--
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]


#1234931 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-09-29 12:00 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qdZRv-2U9-1@gated-at.bofh.it>
In reply to#1233828
On Mon, 2015-09-28 at 03:16 +0000, Mathieu Desnoyers wrote:
> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
> 
> > Some test's Makefile using "$(RM)" while the other's
> > using "rm -f". It is better to use one of them in all
> > tests.
> 
> I agree that this disparity appears to be unwanted. We
> should settle on one or the other.
> 
> > "rm -f" is better, because it is less magic, and everyone
> > konws what is does.
> 
> "$(RM)" is clearly defined as a Makefile implicit variable
> which defaults to "rm -f".
> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

Sure, but you had to look it up didn't you :) - I did.

> Leaving it as a variable is more flexible because then the
> default behavior can be overridden if need be, which is
> not the case of a hardcoded "rm -f".

But I don't think anyone actually wants to do that. Do they?

Anyway I don't really care either way, so I'm happy for you to do a patch that
uses $(RM). Or maybe Wang Long will be happy to respin his patch to use $(RM).

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]


#1234984 — [PATCH] kselftest: replace rm -f command with $(RM)

FromWang Long <long.wanglong@huawei.com>
Date2015-09-29 13:30 +0200
Subject[PATCH] kselftest: replace rm -f command with $(RM)
Message-ID<qe1gC-53J-33@gated-at.bofh.it>
In reply to#1234931
Some test's Makefile using "$(RM)" while the other's
using "rm -f". It is better to use one of them in all
tests.

"$(RM)" is clearly defined as a Makefile implicit variable
which defaults to "rm -f".
Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 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
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -14,4 +14,4 @@ tempfile:
 	dd if=/dev/zero of=tempfile bs=64k count=1
 
 clean:
-	rm -f $(TEST_PROGS) tempfile
+	$(RM) $(TEST_PROGS) tempfile
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
index a9099d9..170f3a6 100644
--- a/tools/testing/selftests/powerpc/pmu/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -33,7 +33,7 @@ override define INSTALL_RULE
 endef
 
 clean:
-	rm -f $(TEST_PROGS) loop.o
+	$(RM) $(TEST_PROGS) loop.o
 	$(MAKE) -C ebb clean
 
 ebb:
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index 5cdc9db..977875f 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -27,4 +27,4 @@ lost_exception_test: ../lib.c
 include ../../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS)
+	$(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/primitives/Makefile b/tools/testing/selftests/powerpc/primitives/Makefile
index b68c622..2261bd1 100644
--- a/tools/testing/selftests/powerpc/primitives/Makefile
+++ b/tools/testing/selftests/powerpc/primitives/Makefile
@@ -9,4 +9,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/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 2a728f4..ea89afd 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -12,4 +12,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/switch_endian/Makefile b/tools/testing/selftests/powerpc/switch_endian/Makefile
index e21d106..6cfe0f0 100644
--- a/tools/testing/selftests/powerpc/switch_endian/Makefile
+++ b/tools/testing/selftests/powerpc/switch_endian/Makefile
@@ -15,4 +15,4 @@ check-reversed.S: check-reversed.o
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS) *.o check-reversed.S
+	$(RM) $(TEST_PROGS) *.o check-reversed.S
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 4bea62a..f04bd4b 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -10,4 +10,4 @@ tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS) *.o
+	$(RM) $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/vphn/Makefile b/tools/testing/selftests/powerpc/vphn/Makefile
index a485f2e..d98f32c 100644
--- a/tools/testing/selftests/powerpc/vphn/Makefile
+++ b/tools/testing/selftests/powerpc/vphn/Makefile
@@ -9,4 +9,4 @@ $(TEST_PROGS): ../harness.c
 include ../../lib.mk
 
 clean:
-	rm -f $(TEST_PROGS)
+	$(RM) $(TEST_PROGS)
diff --git a/tools/testing/selftests/ptrace/Makefile b/tools/testing/selftests/ptrace/Makefile
index 453927f..ec5bf58 100644
--- a/tools/testing/selftests/ptrace/Makefile
+++ b/tools/testing/selftests/ptrace/Makefile
@@ -4,7 +4,7 @@ peeksiginfo: peeksiginfo.c
 all: peeksiginfo
 
 clean:
-	rm -f peeksiginfo
+	$(RM) peeksiginfo
 
 TEST_PROGS := peeksiginfo
 
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index 89a3f44..a5889e2 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -33,4 +33,4 @@ run_destructive_tests: run_tests
 	./set-2038
 
 clean:
-	rm -f ${bins}
+	$(RM) ${bins}
-- 
1.8.3.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] | [prev] | [next] | [standalone]


#1235433 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromKees Cook <keescook@chromium.org>
Date2015-09-29 19:50 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qe7cm-50W-3@gated-at.bofh.it>
In reply to#1234931
On Tue, Sep 29, 2015 at 2:57 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Mon, 2015-09-28 at 03:16 +0000, Mathieu Desnoyers wrote:
>> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
>>
>> > Some test's Makefile using "$(RM)" while the other's
>> > using "rm -f". It is better to use one of them in all
>> > tests.
>>
>> I agree that this disparity appears to be unwanted. We
>> should settle on one or the other.
>>
>> > "rm -f" is better, because it is less magic, and everyone
>> > konws what is does.
>>
>> "$(RM)" is clearly defined as a Makefile implicit variable
>> which defaults to "rm -f".
>> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>
> Sure, but you had to look it up didn't you :) - I did.
>
>> Leaving it as a variable is more flexible because then the
>> default behavior can be overridden if need be, which is
>> not the case of a hardcoded "rm -f".
>
> But I don't think anyone actually wants to do that. Do they?
>
> Anyway I don't really care either way, so I'm happy for you to do a patch that
> uses $(RM). Or maybe Wang Long will be happy to respin his patch to use $(RM).

Yes, please. $(RM) is preferred, as that is the existing standard and
gives us flexibility.

-Kees

-- 
Kees Cook
Chrome OS Security
--
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]


#1238732 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromDarren Hart <dvhart@infradead.org>
Date2015-10-03 06:40 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qfmM1-86s-1@gated-at.bofh.it>
In reply to#1233828
On Mon, Sep 28, 2015 at 03:16:53AM +0000, Mathieu Desnoyers wrote:
> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
> 
> > Some test's Makefile using "$(RM)" while the other's
> > using "rm -f". It is better to use one of them in all
> > tests.
> 
> I agree that this disparity appears to be unwanted. We
> should settle on one or the other.
> 
> > 
> > "rm -f" is better, because it is less magic, and everyone
> > konws what is does.
> 
> "$(RM)" is clearly defined as a Makefile implicit variable
> which defaults to "rm -f".
> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
> 
> Leaving it as a variable is more flexible because then the
> default behavior can be overridden if need be, which is
> not the case of a hardcoded "rm -f".
> 
> Following your line of argumentation, we should then
> invoke "gcc" directly in every Makefile because it is
> less magic than "$(CC)". This makes no sense.

I don't think they can be compared so simply. Specifying a compiler is a common
use case. Customizing the rm command is not, in my experience anyway, and like
Michael, I would definately have to look up what RM means.

That said, I care more about consistency than which is used. Both are valid, but
$(RM), while more flexible, will cost more people time to look up what it does
as it isn't commonly used than any benefit we're likely to see from its use.

Meh. :-)

-- 
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 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]


#1238893 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2015-10-03 16:20 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qfvPk-4dk-9@gated-at.bofh.it>
In reply to#1238732
----- On Oct 3, 2015, at 12:38 AM, dvhart dvhart@infradead.org wrote:

> On Mon, Sep 28, 2015 at 03:16:53AM +0000, Mathieu Desnoyers wrote:
>> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
>> 
>> > Some test's Makefile using "$(RM)" while the other's
>> > using "rm -f". It is better to use one of them in all
>> > tests.
>> 
>> I agree that this disparity appears to be unwanted. We
>> should settle on one or the other.
>> 
>> > 
>> > "rm -f" is better, because it is less magic, and everyone
>> > konws what is does.
>> 
>> "$(RM)" is clearly defined as a Makefile implicit variable
>> which defaults to "rm -f".
>> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>> 
>> Leaving it as a variable is more flexible because then the
>> default behavior can be overridden if need be, which is
>> not the case of a hardcoded "rm -f".
>> 
>> Following your line of argumentation, we should then
>> invoke "gcc" directly in every Makefile because it is
>> less magic than "$(CC)". This makes no sense.
> 
> I don't think they can be compared so simply. Specifying a compiler is a common
> use case. Customizing the rm command is not, in my experience anyway, and like
> Michael, I would definately have to look up what RM means.
> 
> That said, I care more about consistency than which is used. Both are valid, but
> $(RM), while more flexible, will cost more people time to look up what it does
> as it isn't commonly used than any benefit we're likely to see from its use.
> 
> Meh. :-)

An example is "grm" when you install the opencsw repository
packages on Solaris. In the unlikely example where someone
would have a Solaris machine to build Linux, overriding
various command names, including "rm", can be useful. This
is just one example, there are probably others.

Thanks,

Mathieu

> 
> --
> Darren Hart
> Intel Open Source Technology Center

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
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]


#1238968 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromJosh Triplett <josh@joshtriplett.org>
Date2015-10-03 20:00 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qfzge-zl-11@gated-at.bofh.it>
In reply to#1238893
On Sat, Oct 03, 2015 at 02:11:57PM +0000, Mathieu Desnoyers wrote:
> ----- On Oct 3, 2015, at 12:38 AM, dvhart dvhart@infradead.org wrote:
> 
> > On Mon, Sep 28, 2015 at 03:16:53AM +0000, Mathieu Desnoyers wrote:
> >> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
> >> 
> >> > Some test's Makefile using "$(RM)" while the other's
> >> > using "rm -f". It is better to use one of them in all
> >> > tests.
> >> 
> >> I agree that this disparity appears to be unwanted. We
> >> should settle on one or the other.
> >> 
> >> > 
> >> > "rm -f" is better, because it is less magic, and everyone
> >> > konws what is does.
> >> 
> >> "$(RM)" is clearly defined as a Makefile implicit variable
> >> which defaults to "rm -f".
> >> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
> >> 
> >> Leaving it as a variable is more flexible because then the
> >> default behavior can be overridden if need be, which is
> >> not the case of a hardcoded "rm -f".
> >> 
> >> Following your line of argumentation, we should then
> >> invoke "gcc" directly in every Makefile because it is
> >> less magic than "$(CC)". This makes no sense.
> > 
> > I don't think they can be compared so simply. Specifying a compiler is a common
> > use case. Customizing the rm command is not, in my experience anyway, and like
> > Michael, I would definately have to look up what RM means.
> > 
> > That said, I care more about consistency than which is used. Both are valid, but
> > $(RM), while more flexible, will cost more people time to look up what it does
> > as it isn't commonly used than any benefit we're likely to see from its use.
> > 
> > Meh. :-)
> 
> An example is "grm" when you install the opencsw repository
> packages on Solaris. In the unlikely example where someone
> would have a Solaris machine to build Linux, overriding
> various command names, including "rm", can be useful. This
> is just one example, there are probably others.

Does Solaris rm not support -f?
--
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]


#1238969 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2015-10-03 20:10 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qfzpU-106-1@gated-at.bofh.it>
In reply to#1238968
----- On Oct 3, 2015, at 1:55 PM, Josh Triplett josh@joshtriplett.org wrote:

> On Sat, Oct 03, 2015 at 02:11:57PM +0000, Mathieu Desnoyers wrote:
>> ----- On Oct 3, 2015, at 12:38 AM, dvhart dvhart@infradead.org wrote:
>> 
>> > On Mon, Sep 28, 2015 at 03:16:53AM +0000, Mathieu Desnoyers wrote:
>> >> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote:
>> >> 
>> >> > Some test's Makefile using "$(RM)" while the other's
>> >> > using "rm -f". It is better to use one of them in all
>> >> > tests.
>> >> 
>> >> I agree that this disparity appears to be unwanted. We
>> >> should settle on one or the other.
>> >> 
>> >> > 
>> >> > "rm -f" is better, because it is less magic, and everyone
>> >> > konws what is does.
>> >> 
>> >> "$(RM)" is clearly defined as a Makefile implicit variable
>> >> which defaults to "rm -f".
>> >> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
>> >> 
>> >> Leaving it as a variable is more flexible because then the
>> >> default behavior can be overridden if need be, which is
>> >> not the case of a hardcoded "rm -f".
>> >> 
>> >> Following your line of argumentation, we should then
>> >> invoke "gcc" directly in every Makefile because it is
>> >> less magic than "$(CC)". This makes no sense.
>> > 
>> > I don't think they can be compared so simply. Specifying a compiler is a common
>> > use case. Customizing the rm command is not, in my experience anyway, and like
>> > Michael, I would definately have to look up what RM means.
>> > 
>> > That said, I care more about consistency than which is used. Both are valid, but
>> > $(RM), while more flexible, will cost more people time to look up what it does
>> > as it isn't commonly used than any benefit we're likely to see from its use.
>> > 
>> > Meh. :-)
>> 
>> An example is "grm" when you install the opencsw repository
>> packages on Solaris. In the unlikely example where someone
>> would have a Solaris machine to build Linux, overriding
>> various command names, including "rm", can be useful. This
>> is just one example, there are probably others.
> 
> Does Solaris rm not support -f?

Yes, it does. I was merely showing this as an example where
it can be useful to override the command name, although I don't
expect anyone to have to use "grm" rather than "rm" on that
specific platform.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
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]


#1233912 — Re: [PATCH] kselftest: replace $(RM) with rm -f command

FromYuan Sun <sunyuan3@huawei.com>
Date2015-09-28 09:40 +0200
SubjectRe: [PATCH] kselftest: replace $(RM) with rm -f command
Message-ID<qdBcu-7x9-9@gated-at.bofh.it>
In reply to#1233817
See the in-line comment.
On 2015/9/28 10:10, Wang Long wrote:
> Some test's Makefile using "$(RM)" while the other's
> using "rm -f". It is better to use one of them in all
> tests.
>
> "rm -f" is better, because it is less magic, and everyone
> konws what is does.
>
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
> ---
>   tools/testing/selftests/capabilities/Makefile | 2 +-
>   tools/testing/selftests/kcmp/Makefile         | 2 +-
>   tools/testing/selftests/membarrier/Makefile   | 2 +-
>   tools/testing/selftests/memfd/Makefile        | 2 +-
>   tools/testing/selftests/net/Makefile          | 2 +-
>   tools/testing/selftests/seccomp/Makefile      | 2 +-
>   tools/testing/selftests/size/Makefile         | 2 +-
>   tools/testing/selftests/vm/Makefile           | 2 +-
>   tools/testing/selftests/x86/Makefile          | 2 +-
>   tools/testing/selftests/zram/Makefile         | 2 +-
>   10 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile
> index 8c8f0c1..dcc1972 100644
> --- a/tools/testing/selftests/capabilities/Makefile
> +++ b/tools/testing/selftests/capabilities/Makefile
> @@ -12,7 +12,7 @@ CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
>   all: $(TARGETS)
>   
>   clean:
> -	$(RM) $(TARGETS)
> +	rm -f $(TARGETS)
>   
>   $(TARGETS): %: %.c
>   	$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
> diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
> index 2ae7450..2deaee0 100644
> --- a/tools/testing/selftests/kcmp/Makefile
> +++ b/tools/testing/selftests/kcmp/Makefile
> @@ -7,4 +7,4 @@ TEST_PROGS := kcmp_test
>   include ../lib.mk
>   
>   clean:
> -	$(RM) kcmp_test kcmp-test-file
> +	rn -f kcmp_test kcmp-test-file
It should be rm, not rn.
> diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile
> index a1a9708..f23fc58 100644
> --- a/tools/testing/selftests/membarrier/Makefile
> +++ b/tools/testing/selftests/membarrier/Makefile
> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
>   include ../lib.mk
>   
>   clean:
> -	$(RM) $(TEST_PROGS)
> +	rm -f $(TEST_PROGS)
> diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
> index 3e7eb79..068fa93 100644
> --- a/tools/testing/selftests/memfd/Makefile
> +++ b/tools/testing/selftests/memfd/Makefile
> @@ -19,4 +19,4 @@ run_fuse: build_fuse
>   	@./run_fuse_test.sh || echo "fuse_test: [FAIL]"
>   
>   clean:
> -	$(RM) memfd_test fuse_test
> +	rm -f memfd_test fuse_test
> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> index fac4782..ec7eaa4 100644
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -16,4 +16,4 @@ TEST_FILES := $(NET_PROGS)
>   include ../lib.mk
>   
>   clean:
> -	$(RM) $(NET_PROGS)
> +	rm -f $(NET_PROGS)
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index 8401e87..c16072a 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -7,4 +7,4 @@ all: $(TEST_PROGS)
>   include ../lib.mk
>   
>   clean:
> -	$(RM) $(TEST_PROGS)
> +	rm -f $(TEST_PROGS)
> diff --git a/tools/testing/selftests/size/Makefile b/tools/testing/selftests/size/Makefile
> index bbd0b53..cefe914 100644
> --- a/tools/testing/selftests/size/Makefile
> +++ b/tools/testing/selftests/size/Makefile
> @@ -8,4 +8,4 @@ TEST_PROGS := get_size
>   include ../lib.mk
>   
>   clean:
> -	$(RM) get_size
> +	rm -f get_size
> diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
> index 3c53cac..26663c7 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -24,4 +24,4 @@ TEST_FILES := $(BINARIES)
>   include ../lib.mk
>   
>   clean:
> -	$(RM) $(BINARIES)
> +	rm -f $(BINARIES)
> diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
> index 29089b2..48b2406 100644
> --- a/tools/testing/selftests/x86/Makefile
> +++ b/tools/testing/selftests/x86/Makefile
> @@ -32,7 +32,7 @@ all_32: $(BINARIES_32)
>   all_64: $(BINARIES_64)
>   
>   clean:
> -	$(RM) $(BINARIES_32) $(BINARIES_64)
> +	rm -f $(BINARIES_32) $(BINARIES_64)
>   
>   $(TARGETS_C_32BIT_ALL:%=%_32): %_32: %.c
>   	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
> diff --git a/tools/testing/selftests/zram/Makefile b/tools/testing/selftests/zram/Makefile
> index 29d8034..e1591c8 100644
> --- a/tools/testing/selftests/zram/Makefile
> +++ b/tools/testing/selftests/zram/Makefile
> @@ -6,4 +6,4 @@ TEST_FILES := zram01.sh zram02.sh zram_lib.sh
>   include ../lib.mk
>   
>   clean:
> -	$(RM) err.log
> +	rm -f err.log

--
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]


#1231811

From"long.wanglong" <long.wanglong@huawei.com>
Date2015-09-24 04:10 +0200
Message-ID<qc48V-5Uv-5@gated-at.bofh.it>
In reply to#1231806
On 2015/9/24 9:46, Michael Ellerman wrote:
> On Wed, 2015-09-23 at 09:40 +0000, 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 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