linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix clean target warnings
@ 2017-04-21 23:14 Shuah Khan
  2017-04-21 23:14 ` [PATCH 1/8] selftests: splice: fix clean target to not remove default_file_splice_read.sh Shuah Khan
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

This patch series consists of changes to lib.mk to allow overriding
common clean target from Makefiles. This fixes warnings when clean
overriding and ignoring warnings. Also fixes splice clean target
removing a script that runs the test from its clean target.

Shuah Khan (8):
  selftests: splice: fix clean target to not remove
    default_file_splice_read.sh
  selftests: lib.mk: define CLEAN macro to allow Makefiles to override
    clean
  selftests: futex: override clean in lib.mk to fix warnings
  selftests: gpio: override clean in lib.mk to fix warnings
  selftests: powerpc: override clean in lib.mk to fix warnings
  selftests: splice: override clean in lib.mk to fix warnings
  selftests: sync: override clean in lib.mk to fix warnings
  selftests: x86: override clean in lib.mk to fix warnings

 tools/testing/selftests/futex/Makefile   | 3 ++-
 tools/testing/selftests/gpio/Makefile    | 3 ++-
 tools/testing/selftests/lib.mk           | 6 +++++-
 tools/testing/selftests/powerpc/Makefile | 3 ++-
 tools/testing/selftests/splice/Makefile  | 5 +++--
 tools/testing/selftests/sync/Makefile    | 3 ++-
 tools/testing/selftests/x86/Makefile     | 3 ++-
 7 files changed, 18 insertions(+), 8 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 1/8] selftests: splice: fix clean target to not remove default_file_splice_read.sh
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-21 23:14 ` [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Shuah Khan
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

splice clean target removes the shell script default_file_splice_read.sh
that runs the splice test. Fix it to not remove this file.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/splice/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/splice/Makefile b/tools/testing/selftests/splice/Makefile
index de51f43..559512c 100644
--- a/tools/testing/selftests/splice/Makefile
+++ b/tools/testing/selftests/splice/Makefile
@@ -5,4 +5,4 @@ all: $(TEST_PROGS) $(EXTRA)
 include ../lib.mk
 
 clean:
-	rm -fr $(TEST_PROGS) $(EXTRA)
+	rm -fr $(EXTRA)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
  2017-04-21 23:14 ` [PATCH 1/8] selftests: splice: fix clean target to not remove default_file_splice_read.sh Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-22  5:38   ` Michael Ellerman
  2017-04-24 15:45   ` David Laight
  2017-04-21 23:14 ` [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings Shuah Khan
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Define CLEAN macro to allow Makefiles to override common clean target
in lib.mk. This will help fix the following failures:

warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/lib.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 775c589..959273c 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -51,8 +51,12 @@ endef
 emit_tests:
 	$(EMIT_TESTS)
 
-clean:
+define CLEAN
 	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
+endef
+
+clean:
+	$(CLEAN)
 
 $(OUTPUT)/%:%.c
 	$(LINK.c) $^ $(LDLIBS) -o $@
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
  2017-04-21 23:14 ` [PATCH 1/8] selftests: splice: fix clean target to not remove default_file_splice_read.sh Shuah Khan
  2017-04-21 23:14 ` [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-27 21:54   ` Darren Hart
  2017-04-21 23:14 ` [PATCH 4/8] selftests: gpio: " Shuah Khan
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:36: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/futex/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index c8095e6..e2fbb89 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -32,9 +32,10 @@ override define EMIT_TESTS
 	echo "./run.sh"
 endef
 
-clean:
+override define CLEAN
 	for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
 	done
+endef
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (2 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-22  5:40   ` Michael Ellerman
  2017-04-21 23:14 ` [PATCH 5/8] selftests: powerpc: " Shuah Khan
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:11: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/gpio/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 205e4d1..4f6d9e0 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -7,8 +7,9 @@ include ../lib.mk
 
 all: $(BINARIES)
 
-clean:
+override define CLEAN
 	$(RM) $(BINARIES)
+endef
 
 CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/
 LDLIBS += -lmount -I/usr/include/libmount
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 5/8] selftests: powerpc: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (3 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 4/8] selftests: gpio: " Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-21 23:14 ` [PATCH 6/8] selftests: splice: " Shuah Khan
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:63: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/powerpc/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
index 1c5d057..8d9fc64 100644
--- a/tools/testing/selftests/powerpc/Makefile
+++ b/tools/testing/selftests/powerpc/Makefile
@@ -59,12 +59,13 @@ override define EMIT_TESTS
 	done;
 endef
 
-clean:
+override define CLEAN
 	@for TARGET in $(SUB_DIRS); do \
 		BUILD_TARGET=$$OUTPUT/$$TARGET;	\
 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean; \
 	done;
 	rm -f tags
+endef
 
 tags:
 	find . -name '*.c' -o -name '*.h' | xargs ctags
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (4 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 5/8] selftests: powerpc: " Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-22  5:40   ` Michael Ellerman
  2017-04-21 23:14 ` [PATCH 7/8] selftests: sync: " Shuah Khan
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:8: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/splice/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/splice/Makefile b/tools/testing/selftests/splice/Makefile
index 559512c..3f967ba 100644
--- a/tools/testing/selftests/splice/Makefile
+++ b/tools/testing/selftests/splice/Makefile
@@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA)
 
 include ../lib.mk
 
-clean:
+override define CLEAN
 	rm -fr $(EXTRA)
+endef
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (5 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 6/8] selftests: splice: " Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-22  5:41   ` Michael Ellerman
  2017-04-21 23:14 ` [PATCH 8/8] selftests: x86: " Shuah Khan
  2017-04-27 22:02 ` [PATCH 0/8] Fix clean target warnings Shuah Khan
  8 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:24: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/sync/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
index 87ac400..f7d250d 100644
--- a/tools/testing/selftests/sync/Makefile
+++ b/tools/testing/selftests/sync/Makefile
@@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o
 
 sync_test: $(OBJS) $(TESTS)
 
-clean:
+override define CLEAN
 	$(RM) sync_test $(OBJS) $(TESTS)
+endef
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (6 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 7/8] selftests: sync: " Shuah Khan
@ 2017-04-21 23:14 ` Shuah Khan
  2017-04-22  5:41   ` Michael Ellerman
  2017-04-27 22:02 ` [PATCH 0/8] Fix clean target warnings Shuah Khan
  8 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-21 23:14 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Add override for lib.mk clean to fix the following warnings from clean
target run.

Makefile:44: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/x86/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 38e0a9c..4d27550 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -40,8 +40,9 @@ all_32: $(BINARIES_32)
 
 all_64: $(BINARIES_64)
 
-clean:
+override define CLEAN
 	$(RM) $(BINARIES_32) $(BINARIES_64)
+endef
 
 $(BINARIES_32): $(OUTPUT)/%_32: %.c
 	$(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-21 23:14 ` [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Shuah Khan
@ 2017-04-22  5:38   ` Michael Ellerman
  2017-04-25 13:36     ` Shuah Khan
  2017-04-24 15:45   ` David Laight
  1 sibling, 1 reply; 27+ messages in thread
From: Michael Ellerman @ 2017-04-22  5:38 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Shuah Khan <shuahkh@osg.samsung.com> writes:

> Define CLEAN macro to allow Makefiles to override common clean target
> in lib.mk. This will help fix the following failures:
>
> warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

Should probably have:

Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target")


In hindsight I'm not sure moving the clean target into lib.mk was
the best idea, but anyway it's a bit late to change our mind on that.

This patch is a good solution to fix the warnings.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings
  2017-04-21 23:14 ` [PATCH 4/8] selftests: gpio: " Shuah Khan
@ 2017-04-22  5:40   ` Michael Ellerman
  2017-04-25 15:02     ` Shuah Khan
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Ellerman @ 2017-04-22  5:40 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Shuah Khan <shuahkh@osg.samsung.com> writes:

> Add override for lib.mk clean to fix the following warnings from clean
> target run.
>
> Makefile:11: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/gpio/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
> index 205e4d1..4f6d9e0 100644
> --- a/tools/testing/selftests/gpio/Makefile
> +++ b/tools/testing/selftests/gpio/Makefile
> @@ -7,8 +7,9 @@ include ../lib.mk
>  
>  all: $(BINARIES)
>  
> -clean:
> +override define CLEAN
>  	$(RM) $(BINARIES)
> +endef

This could be achieved more simply with:

EXTRA_CLEAN := $(BINARIES)

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings
  2017-04-21 23:14 ` [PATCH 6/8] selftests: splice: " Shuah Khan
@ 2017-04-22  5:40   ` Michael Ellerman
  2017-04-25 15:03     ` Shuah Khan
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Ellerman @ 2017-04-22  5:40 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Shuah Khan <shuahkh@osg.samsung.com> writes:

> Add override for lib.mk clean to fix the following warnings from clean
> target run.
>
> Makefile:8: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/splice/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/splice/Makefile b/tools/testing/selftests/splice/Makefile
> index 559512c..3f967ba 100644
> --- a/tools/testing/selftests/splice/Makefile
> +++ b/tools/testing/selftests/splice/Makefile
> @@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA)
>  
>  include ../lib.mk
>  
> -clean:
> +override define CLEAN
>  	rm -fr $(EXTRA)
> +endef

Could just be:

EXTRA_CLEAN := $(EXTRA)

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings
  2017-04-21 23:14 ` [PATCH 7/8] selftests: sync: " Shuah Khan
@ 2017-04-22  5:41   ` Michael Ellerman
  2017-04-25 15:03     ` Shuah Khan
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Ellerman @ 2017-04-22  5:41 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Shuah Khan <shuahkh@osg.samsung.com> writes:

> Add override for lib.mk clean to fix the following warnings from clean
> target run.
>
> Makefile:24: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/sync/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
> index 87ac400..f7d250d 100644
> --- a/tools/testing/selftests/sync/Makefile
> +++ b/tools/testing/selftests/sync/Makefile
> @@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o
>  
>  sync_test: $(OBJS) $(TESTS)
>  
> -clean:
> +override define CLEAN
>  	$(RM) sync_test $(OBJS) $(TESTS)
> +endef

EXTRA_CLEAN := sync_test $(OBJS) $(TESTS)

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
  2017-04-21 23:14 ` [PATCH 8/8] selftests: x86: " Shuah Khan
@ 2017-04-22  5:41   ` Michael Ellerman
  2017-04-24 15:57     ` David Laight
  2017-04-25 15:03     ` Shuah Khan
  0 siblings, 2 replies; 27+ messages in thread
From: Michael Ellerman @ 2017-04-22  5:41 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: Shuah Khan, viro, emilio.lopez, mingo, luto, dave.hansen,
	dsafonov, rkrcmar, linux-kselftest, linux-kernel, linux-gpio,
	linuxppc-dev

Shuah Khan <shuahkh@osg.samsung.com> writes:

> Add override for lib.mk clean to fix the following warnings from clean
> target run.
>
> Makefile:44: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/x86/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
> index 38e0a9c..4d27550 100644
> --- a/tools/testing/selftests/x86/Makefile
> +++ b/tools/testing/selftests/x86/Makefile
> @@ -40,8 +40,9 @@ all_32: $(BINARIES_32)
>  
>  all_64: $(BINARIES_64)
>  
> -clean:
> +override define CLEAN
>  	$(RM) $(BINARIES_32) $(BINARIES_64)
> +endef

Simpler as:

EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-21 23:14 ` [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Shuah Khan
  2017-04-22  5:38   ` Michael Ellerman
@ 2017-04-24 15:45   ` David Laight
  2017-04-24 19:46     ` Shuah Khan
  1 sibling, 1 reply; 27+ messages in thread
From: David Laight @ 2017-04-24 15:45 UTC (permalink / raw)
  To: 'Shuah Khan', shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: linux-kselftest, rkrcmar, dsafonov, dave.hansen, linux-kernel,
	emilio.lopez, linux-gpio, viro, luto, linuxppc-dev, mingo

From: Shuah Khan
> Sent: 22 April 2017 00:15
> Define CLEAN macro to allow Makefiles to override common clean target
> in lib.mk. This will help fix the following failures:
> 
> warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/lib.mk | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 775c589..959273c 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -51,8 +51,12 @@ endef
>  emit_tests:
>  	$(EMIT_TESTS)
> 
> -clean:
> +define CLEAN
>  	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
> +endef
> +
> +clean:
> +	$(CLEAN)

If might be easier to do something like:

ifneq($(NO_CLEAN),y)
clean:
	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
endif

	David

^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
  2017-04-22  5:41   ` Michael Ellerman
@ 2017-04-24 15:57     ` David Laight
  2017-04-24 19:48       ` Shuah Khan
  2017-04-25 15:03     ` Shuah Khan
  1 sibling, 1 reply; 27+ messages in thread
From: David Laight @ 2017-04-24 15:57 UTC (permalink / raw)
  To: 'Michael Ellerman',
	Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: linux-kselftest, rkrcmar, dsafonov, dave.hansen, Shuah Khan,
	linux-kernel, emilio.lopez, linux-gpio, viro, luto, linuxppc-dev,
	mingo

From: Linuxppc-dev Michael Ellerman
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
> > Add override for lib.mk clean to fix the following warnings from clean
> > target run.
> >
> > Makefile:44: warning: overriding recipe for target 'clean'
> > ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> >
> > Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> > ---
> >  tools/testing/selftests/x86/Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
> > index 38e0a9c..4d27550 100644
> > --- a/tools/testing/selftests/x86/Makefile
> > +++ b/tools/testing/selftests/x86/Makefile
> > @@ -40,8 +40,9 @@ all_32: $(BINARIES_32)
> >
> >  all_64: $(BINARIES_64)
> >
> > -clean:
> > +override define CLEAN
> >  	$(RM) $(BINARIES_32) $(BINARIES_64)
> > +endef
> 
> Simpler as:
> 
> EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)

Actually for builds that insist on crapping all over the source tree I've used:

clean:
	rm -rf `cat .cvsignore 2>/dev/null`

	David

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-24 15:45   ` David Laight
@ 2017-04-24 19:46     ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-24 19:46 UTC (permalink / raw)
  To: David Laight, 'Shuah Khan',
	bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: linux-kselftest, rkrcmar, dsafonov, dave.hansen, linux-kernel,
	emilio.lopez, linux-gpio, viro, luto, linuxppc-dev, mingo,
	Shuah Khan

On 04/24/2017 09:45 AM, David Laight wrote:
> From: Shuah Khan
>> Sent: 22 April 2017 00:15
>> Define CLEAN macro to allow Makefiles to override common clean target
>> in lib.mk. This will help fix the following failures:
>>
>> warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/lib.mk | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
>> index 775c589..959273c 100644
>> --- a/tools/testing/selftests/lib.mk
>> +++ b/tools/testing/selftests/lib.mk
>> @@ -51,8 +51,12 @@ endef
>>  emit_tests:
>>  	$(EMIT_TESTS)
>>
>> -clean:
>> +define CLEAN
>>  	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
>> +endef
>> +
>> +clean:
>> +	$(CLEAN)
> 
> If might be easier to do something like:
> 
> ifneq($(NO_CLEAN),y)
> clean:
> 	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
> endif
> 
> 	David
> 

I am not sure that it is easier. Defining a macro would work well
in this case to override and also works well with what we are doing
for other overrides we already have such as EMIT_TESTS.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
  2017-04-24 15:57     ` David Laight
@ 2017-04-24 19:48       ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-24 19:48 UTC (permalink / raw)
  To: David Laight, 'Michael Ellerman',
	Shuah Khan, bamvor.zhangjian, benh, paulus, dvhart
  Cc: linux-kselftest, rkrcmar, dsafonov, dave.hansen, linux-kernel,
	emilio.lopez, linux-gpio, viro, luto, linuxppc-dev, mingo,
	Shuah Khan

On 04/24/2017 09:57 AM, David Laight wrote:
> From: Linuxppc-dev Michael Ellerman
>> Shuah Khan <shuahkh@osg.samsung.com> writes:
>>
>>> Add override for lib.mk clean to fix the following warnings from clean
>>> target run.
>>>
>>> Makefile:44: warning: overriding recipe for target 'clean'
>>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>>
>>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>>> ---
>>>  tools/testing/selftests/x86/Makefile | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
>>> index 38e0a9c..4d27550 100644
>>> --- a/tools/testing/selftests/x86/Makefile
>>> +++ b/tools/testing/selftests/x86/Makefile
>>> @@ -40,8 +40,9 @@ all_32: $(BINARIES_32)
>>>
>>>  all_64: $(BINARIES_64)
>>>
>>> -clean:
>>> +override define CLEAN
>>>  	$(RM) $(BINARIES_32) $(BINARIES_64)
>>> +endef
>>
>> Simpler as:
>>
>> EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)
> 
> Actually for builds that insist on crapping all over the source tree I've used:
> 
> clean:
> 	rm -rf `cat .cvsignore 2>/dev/null`
> 
> 	David

This will have to be done as a separate change. The warnings I am fixing
are related to common clean target in lib.mk and the need to override.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-22  5:38   ` Michael Ellerman
@ 2017-04-25 13:36     ` Shuah Khan
  2017-04-26 10:55       ` Michael Ellerman
  0 siblings, 1 reply; 27+ messages in thread
From: Shuah Khan @ 2017-04-25 13:36 UTC (permalink / raw)
  To: Michael Ellerman, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	Shuah Khan

On 04/21/2017 11:38 PM, Michael Ellerman wrote:
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
>> Define CLEAN macro to allow Makefiles to override common clean target
>> in lib.mk. This will help fix the following failures:
>>
>> warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> 
> Should probably have:
> 
> Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target")

Amended the change log to add the above.

> 
> 
> In hindsight I'm not sure moving the clean target into lib.mk was
> the best idea, but anyway it's a bit late to change our mind on that.

Yeah. Moving clean target to lib.mk ended up to be problematic. However,
there are some advantages as well. It will simplify some Makefiles. One
thing that was missed was that not finding the Makefiles that require
overrides. Anyway live and learn.

> 
> This patch is a good solution to fix the warnings.
> 
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
> 

Thanks. I plan to apply the patch with the amended changelog and your
Ack. Please let me know if you want to see v2 with the change sent out.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings
  2017-04-22  5:40   ` Michael Ellerman
@ 2017-04-25 15:02     ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-25 15:02 UTC (permalink / raw)
  To: Michael Ellerman, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	shuah Khan

On 04/21/2017 11:40 PM, Michael Ellerman wrote:
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
>> Add override for lib.mk clean to fix the following warnings from clean
>> target run.
>>
>> Makefile:11: warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/gpio/Makefile | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
>> index 205e4d1..4f6d9e0 100644
>> --- a/tools/testing/selftests/gpio/Makefile
>> +++ b/tools/testing/selftests/gpio/Makefile
>> @@ -7,8 +7,9 @@ include ../lib.mk
>>  
>>  all: $(BINARIES)
>>  
>> -clean:
>> +override define CLEAN
>>  	$(RM) $(BINARIES)
>> +endef
> 
> This could be achieved more simply with:
> 
> EXTRA_CLEAN := $(BINARIES)
> 

gpio clean requires special handling. I have one more patch
I sent out that handles that. So I am going to leave this
patch the way with override.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings
  2017-04-22  5:40   ` Michael Ellerman
@ 2017-04-25 15:03     ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-25 15:03 UTC (permalink / raw)
  To: Michael Ellerman, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	shuah Khan

On 04/21/2017 11:40 PM, Michael Ellerman wrote:
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
>> Add override for lib.mk clean to fix the following warnings from clean
>> target run.
>>
>> Makefile:8: warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/splice/Makefile | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/splice/Makefile b/tools/testing/selftests/splice/Makefile
>> index 559512c..3f967ba 100644
>> --- a/tools/testing/selftests/splice/Makefile
>> +++ b/tools/testing/selftests/splice/Makefile
>> @@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA)
>>  
>>  include ../lib.mk
>>  
>> -clean:
>> +override define CLEAN
>>  	rm -fr $(EXTRA)
>> +endef
> 
> Could just be:
> 
> EXTRA_CLEAN := $(EXTRA)
> 

Will send v2 with this change.

-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings
  2017-04-22  5:41   ` Michael Ellerman
@ 2017-04-25 15:03     ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-25 15:03 UTC (permalink / raw)
  To: Michael Ellerman, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	shuah Khan

On 04/21/2017 11:41 PM, Michael Ellerman wrote:
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
>> Add override for lib.mk clean to fix the following warnings from clean
>> target run.
>>
>> Makefile:24: warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/sync/Makefile | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
>> index 87ac400..f7d250d 100644
>> --- a/tools/testing/selftests/sync/Makefile
>> +++ b/tools/testing/selftests/sync/Makefile
>> @@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o
>>  
>>  sync_test: $(OBJS) $(TESTS)
>>  
>> -clean:
>> +override define CLEAN
>>  	$(RM) sync_test $(OBJS) $(TESTS)
>> +endef
> 
> EXTRA_CLEAN := sync_test $(OBJS) $(TESTS)
> 

Will send v2 with this change.

-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
  2017-04-22  5:41   ` Michael Ellerman
  2017-04-24 15:57     ` David Laight
@ 2017-04-25 15:03     ` Shuah Khan
  1 sibling, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-25 15:03 UTC (permalink / raw)
  To: Michael Ellerman, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	Shuah Khan

On 04/21/2017 11:41 PM, Michael Ellerman wrote:
> Shuah Khan <shuahkh@osg.samsung.com> writes:
> 
>> Add override for lib.mk clean to fix the following warnings from clean
>> target run.
>>
>> Makefile:44: warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/x86/Makefile | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
>> index 38e0a9c..4d27550 100644
>> --- a/tools/testing/selftests/x86/Makefile
>> +++ b/tools/testing/selftests/x86/Makefile
>> @@ -40,8 +40,9 @@ all_32: $(BINARIES_32)
>>  
>>  all_64: $(BINARIES_64)
>>  
>> -clean:
>> +override define CLEAN
>>  	$(RM) $(BINARIES_32) $(BINARIES_64)
>> +endef
> 
> Simpler as:
> 
> EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)
> 

Will send v2 with this change.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
  2017-04-25 13:36     ` Shuah Khan
@ 2017-04-26 10:55       ` Michael Ellerman
  0 siblings, 0 replies; 27+ messages in thread
From: Michael Ellerman @ 2017-04-26 10:55 UTC (permalink / raw)
  To: Shuah Khan, shuah, bamvor.zhangjian, benh, paulus, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	Shuah Khan

Shuah Khan <shuahkh@osg.samsung.com> writes:
> On 04/21/2017 11:38 PM, Michael Ellerman wrote:
>> Shuah Khan <shuahkh@osg.samsung.com> writes:

>> This patch is a good solution to fix the warnings.
>> 
>> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Thanks. I plan to apply the patch with the amended changelog and your
> Ack. Please let me know if you want to see v2 with the change sent out.

I don't really mind if you send it or not.

cheers

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings
  2017-04-21 23:14 ` [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings Shuah Khan
@ 2017-04-27 21:54   ` Darren Hart
  2017-04-27 21:57     ` Shuah Khan
  0 siblings, 1 reply; 27+ messages in thread
From: Darren Hart @ 2017-04-27 21:54 UTC (permalink / raw)
  To: Shuah Khan
  Cc: shuah, bamvor.zhangjian, benh, paulus, mpe, viro, emilio.lopez,
	mingo, luto, dave.hansen, dsafonov, rkrcmar, linux-kselftest,
	linux-kernel, linux-gpio, linuxppc-dev

On Fri, Apr 21, 2017 at 05:14:45PM -0600, Shuah Khan wrote:
> Add override for lib.mk clean to fix the following warnings from clean
> target run.
> 
> Makefile:36: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  tools/testing/selftests/futex/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
> index c8095e6..e2fbb89 100644
> --- a/tools/testing/selftests/futex/Makefile
> +++ b/tools/testing/selftests/futex/Makefile
> @@ -32,9 +32,10 @@ override define EMIT_TESTS
>  	echo "./run.sh"
>  endef
>  
> -clean:
> +override define CLEAN
>  	for DIR in $(SUBDIRS); do		\
>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
>  		mkdir $$BUILD_TARGET  -p;	\
>  		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
>  	done
> +endef

Taking the move of clean into lib.mk as a given,

Acked-by: Darren Hart (VMware) <dvhart@infradead.org>

-- 
Darren Hart
VMware Open Source Technology Center

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings
  2017-04-27 21:54   ` Darren Hart
@ 2017-04-27 21:57     ` Shuah Khan
  0 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-27 21:57 UTC (permalink / raw)
  To: Darren Hart
  Cc: shuah, bamvor.zhangjian, benh, paulus, mpe, viro, emilio.lopez,
	mingo, luto, dave.hansen, dsafonov, rkrcmar, linux-kselftest,
	linux-kernel, linux-gpio, linuxppc-dev, shuah Khan

On 04/27/2017 03:54 PM, Darren Hart wrote:
> On Fri, Apr 21, 2017 at 05:14:45PM -0600, Shuah Khan wrote:
>> Add override for lib.mk clean to fix the following warnings from clean
>> target run.
>>
>> Makefile:36: warning: overriding recipe for target 'clean'
>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/futex/Makefile | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
>> index c8095e6..e2fbb89 100644
>> --- a/tools/testing/selftests/futex/Makefile
>> +++ b/tools/testing/selftests/futex/Makefile
>> @@ -32,9 +32,10 @@ override define EMIT_TESTS
>>  	echo "./run.sh"
>>  endef
>>  
>> -clean:
>> +override define CLEAN
>>  	for DIR in $(SUBDIRS); do		\
>>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
>>  		mkdir $$BUILD_TARGET  -p;	\
>>  		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
>>  	done
>> +endef
> 
> Taking the move of clean into lib.mk as a given,

Yeah I considered undoing that, and chose to fix the missed
issues instead.
> 
> Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
> 

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 0/8] Fix clean target warnings
  2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
                   ` (7 preceding siblings ...)
  2017-04-21 23:14 ` [PATCH 8/8] selftests: x86: " Shuah Khan
@ 2017-04-27 22:02 ` Shuah Khan
  8 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-04-27 22:02 UTC (permalink / raw)
  To: shuah, bamvor.zhangjian, benh, paulus, mpe, dvhart
  Cc: viro, emilio.lopez, mingo, luto, dave.hansen, dsafonov, rkrcmar,
	linux-kselftest, linux-kernel, linux-gpio, linuxppc-dev,
	Shuah Khan

On 04/21/2017 05:14 PM, Shuah Khan wrote:
> This patch series consists of changes to lib.mk to allow overriding
> common clean target from Makefiles. This fixes warnings when clean
> overriding and ignoring warnings. Also fixes splice clean target
> removing a script that runs the test from its clean target.
> 
> Shuah Khan (8):
>   selftests: splice: fix clean target to not remove
>     default_file_splice_read.sh
>   selftests: lib.mk: define CLEAN macro to allow Makefiles to override
>     clean

Applied with amended change log and Michael's ack to linux-kselftest next

>   selftests: futex: override clean in lib.mk to fix warnings
>   selftests: gpio: override clean in lib.mk to fix warnings
>   selftests: powerpc: override clean in lib.mk to fix warnings

Applied all of the above to linux-kseltftest next

>   selftests: splice: override clean in lib.mk to fix warnings
>   selftests: sync: override clean in lib.mk to fix warnings
>   selftests: x86: override clean in lib.mk to fix warnings

Applied v2s addressing Michael's comments to linux-kselftest next
x86 fix also addresses not being able to build ldt_gdt

make -C tools/testing/selftests/x86 ldt_gdt


thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-04-27 22:02 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21 23:14 [PATCH 0/8] Fix clean target warnings Shuah Khan
2017-04-21 23:14 ` [PATCH 1/8] selftests: splice: fix clean target to not remove default_file_splice_read.sh Shuah Khan
2017-04-21 23:14 ` [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Shuah Khan
2017-04-22  5:38   ` Michael Ellerman
2017-04-25 13:36     ` Shuah Khan
2017-04-26 10:55       ` Michael Ellerman
2017-04-24 15:45   ` David Laight
2017-04-24 19:46     ` Shuah Khan
2017-04-21 23:14 ` [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings Shuah Khan
2017-04-27 21:54   ` Darren Hart
2017-04-27 21:57     ` Shuah Khan
2017-04-21 23:14 ` [PATCH 4/8] selftests: gpio: " Shuah Khan
2017-04-22  5:40   ` Michael Ellerman
2017-04-25 15:02     ` Shuah Khan
2017-04-21 23:14 ` [PATCH 5/8] selftests: powerpc: " Shuah Khan
2017-04-21 23:14 ` [PATCH 6/8] selftests: splice: " Shuah Khan
2017-04-22  5:40   ` Michael Ellerman
2017-04-25 15:03     ` Shuah Khan
2017-04-21 23:14 ` [PATCH 7/8] selftests: sync: " Shuah Khan
2017-04-22  5:41   ` Michael Ellerman
2017-04-25 15:03     ` Shuah Khan
2017-04-21 23:14 ` [PATCH 8/8] selftests: x86: " Shuah Khan
2017-04-22  5:41   ` Michael Ellerman
2017-04-24 15:57     ` David Laight
2017-04-24 19:48       ` Shuah Khan
2017-04-25 15:03     ` Shuah Khan
2017-04-27 22:02 ` [PATCH 0/8] Fix clean target warnings Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).