linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/futex: Fix build error with OUTPUT variable
@ 2017-03-24 16:18 Darren Hart
  2017-03-26 12:55 ` Bamvor Zhang
  2017-03-28  0:19 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Darren Hart @ 2017-03-24 16:18 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: linux-kselftest, bamvor.zhangjian, Shuah Khan, stable

The use of $$OUTPUT in the target shell commands resulted in an empty
string followed by an absolute path for which mkdir failed:

$ make -C tools/testing/selftests/futex
make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
Makefile:36: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'
for DIR in functional; do		\
	BUILD_TARGET=$OUTPUT/$DIR;	\
	mkdir $BUILD_TARGET  -p;	\
	make OUTPUT=$BUILD_TARGET -C $DIR all;\
done
mkdir: cannot create directory ‘/functional’: Permission denied

Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
variable. The above make command now completes successfully.

Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Cc: linux-kselftest@vger.kernel.org
Cc: bamvor.zhangjian@huawei.com
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org> # 4.10.x-
---
 tools/testing/selftests/futex/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 653c5cd..c8095e6 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -8,7 +8,7 @@ include ../lib.mk
 
 all:
 	for DIR in $(SUBDIRS); do		\
-		BUILD_TARGET=$$OUTPUT/$$DIR;	\
+		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
 	done
@@ -22,7 +22,7 @@ override define INSTALL_RULE
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
 
 	@for SUBDIR in $(SUBDIRS); do \
-		BUILD_TARGET=$$OUTPUT/$$SUBDIR;	\
+		BUILD_TARGET=$(OUTPUT)/$$SUBDIR;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
 	done;
@@ -34,7 +34,7 @@ endef
 
 clean:
 	for DIR in $(SUBDIRS); do		\
-		BUILD_TARGET=$$OUTPUT/$$DIR;	\
+		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
 	done
-- 
2.9.3


-- 
Darren Hart
VMware Open Source Technology Center

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

* Re: [PATCH] selftests/futex: Fix build error with OUTPUT variable
  2017-03-24 16:18 [PATCH] selftests/futex: Fix build error with OUTPUT variable Darren Hart
@ 2017-03-26 12:55 ` Bamvor Zhang
  2017-03-28  0:19 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Bamvor Zhang @ 2017-03-26 12:55 UTC (permalink / raw)
  To: Darren Hart
  Cc: Linux Kernel Mailing List, linux-kselftest, Bamvor Jian Zhang,
	Shuah Khan, stable

Hi,

On Sat, Mar 25, 2017 at 12:18 AM, Darren Hart <dvhart@infradead.org> wrote:
>
> The use of $$OUTPUT in the target shell commands resulted in an empty
> string followed by an absolute path for which mkdir failed:
>
> $ make -C tools/testing/selftests/futex
> make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
> Makefile:36: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> for DIR in functional; do               \
>         BUILD_TARGET=$OUTPUT/$DIR;      \
>         mkdir $BUILD_TARGET  -p;        \
>         make OUTPUT=$BUILD_TARGET -C $DIR all;\
> done
> mkdir: cannot create directory ‘/functional’: Permission denied
>
> Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
> variable. The above make command now completes successfully.
Test with native and cross-compiler build from selftests/futex or selftests,
the results are good.
Tested-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>

Regards

Bamvor
>
> Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: bamvor.zhangjian@huawei.com
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: <stable@vger.kernel.org> # 4.10.x-
> ---
>  tools/testing/selftests/futex/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
> index 653c5cd..c8095e6 100644
> --- a/tools/testing/selftests/futex/Makefile
> +++ b/tools/testing/selftests/futex/Makefile
> @@ -8,7 +8,7 @@ include ../lib.mk
>
>  all:
>         for DIR in $(SUBDIRS); do               \
> -               BUILD_TARGET=$$OUTPUT/$$DIR;    \
> +               BUILD_TARGET=$(OUTPUT)/$$DIR;   \
>                 mkdir $$BUILD_TARGET  -p;       \
>                 make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
>         done
> @@ -22,7 +22,7 @@ override define INSTALL_RULE
>         install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
>
>         @for SUBDIR in $(SUBDIRS); do \
> -               BUILD_TARGET=$$OUTPUT/$$SUBDIR; \
> +               BUILD_TARGET=$(OUTPUT)/$$SUBDIR;        \
>                 mkdir $$BUILD_TARGET  -p;       \
>                 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
>         done;
> @@ -34,7 +34,7 @@ endef
>
>  clean:
>         for DIR in $(SUBDIRS); do               \
> -               BUILD_TARGET=$$OUTPUT/$$DIR;    \
> +               BUILD_TARGET=$(OUTPUT)/$$DIR;   \
>                 mkdir $$BUILD_TARGET  -p;       \
>                 make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
>         done
> --
> 2.9.3
>
>
> --
> Darren Hart
> VMware Open Source Technology Center




-- 
-----------------------------------------
   arm64, kernel. opensuse
   blog: http://aarch64.me
-----------------------------------------

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

* Re: [PATCH] selftests/futex: Fix build error with OUTPUT variable
  2017-03-24 16:18 [PATCH] selftests/futex: Fix build error with OUTPUT variable Darren Hart
  2017-03-26 12:55 ` Bamvor Zhang
@ 2017-03-28  0:19 ` Michael Ellerman
  2017-03-28  2:23   ` Darren Hart
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2017-03-28  0:19 UTC (permalink / raw)
  To: Darren Hart, Linux Kernel Mailing List
  Cc: linux-kselftest, bamvor.zhangjian, Shuah Khan, stable

Darren Hart <dvhart@infradead.org> writes:

> The use of $$OUTPUT in the target shell commands resulted in an empty
> string followed by an absolute path for which mkdir failed:
>
> $ make -C tools/testing/selftests/futex
> make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
> Makefile:36: warning: overriding recipe for target 'clean'
> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> for DIR in functional; do		\
> 	BUILD_TARGET=$OUTPUT/$DIR;	\
> 	mkdir $BUILD_TARGET  -p;	\
> 	make OUTPUT=$BUILD_TARGET -C $DIR all;\
> done
> mkdir: cannot create directory ‘/functional’: Permission denied
>
> Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
> variable. The above make command now completes successfully.
>
> Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: bamvor.zhangjian@huawei.com
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: <stable@vger.kernel.org> # 4.10.x-

The OUTPUT support only went into v4.11-rc1, so I don't see why you need
a stable tag?

Change looks good though.

cheers

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

* Re: [PATCH] selftests/futex: Fix build error with OUTPUT variable
  2017-03-28  0:19 ` Michael Ellerman
@ 2017-03-28  2:23   ` Darren Hart
  2017-04-11 15:58     ` Shuah Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Darren Hart @ 2017-03-28  2:23 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Linux Kernel Mailing List, linux-kselftest, bamvor.zhangjian,
	Shuah Khan, stable

On Tue, Mar 28, 2017 at 11:19:25AM +1100, Michael Ellerman wrote:
> Darren Hart <dvhart@infradead.org> writes:
> 
> > The use of $$OUTPUT in the target shell commands resulted in an empty
> > string followed by an absolute path for which mkdir failed:
> >
> > $ make -C tools/testing/selftests/futex
> > make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
> > Makefile:36: warning: overriding recipe for target 'clean'
> > ../lib.mk:55: warning: ignoring old recipe for target 'clean'
> > for DIR in functional; do		\
> > 	BUILD_TARGET=$OUTPUT/$DIR;	\
> > 	mkdir $BUILD_TARGET  -p;	\
> > 	make OUTPUT=$BUILD_TARGET -C $DIR all;\
> > done
> > mkdir: cannot create directory ‘/functional’: Permission denied
> >
> > Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
> > variable. The above make command now completes successfully.
> >
> > Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
> > Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: bamvor.zhangjian@huawei.com
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: <stable@vger.kernel.org> # 4.10.x-
> 
> The OUTPUT support only went into v4.11-rc1, so I don't see why you need
> a stable tag?

Git spelunking failure on my part, you are correct. Please disregard the stable
tag.

> 
> Change looks good though.
> 

Thank you for the review.

-- 
Darren Hart
VMware Open Source Technology Center

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

* Re: [PATCH] selftests/futex: Fix build error with OUTPUT variable
  2017-03-28  2:23   ` Darren Hart
@ 2017-04-11 15:58     ` Shuah Khan
  0 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2017-04-11 15:58 UTC (permalink / raw)
  To: Darren Hart, Michael Ellerman
  Cc: Linux Kernel Mailing List, linux-kselftest, bamvor.zhangjian,
	stable, Shuah Khan

On 03/27/2017 08:23 PM, Darren Hart wrote:
> On Tue, Mar 28, 2017 at 11:19:25AM +1100, Michael Ellerman wrote:
>> Darren Hart <dvhart@infradead.org> writes:
>>
>>> The use of $$OUTPUT in the target shell commands resulted in an empty
>>> string followed by an absolute path for which mkdir failed:
>>>
>>> $ make -C tools/testing/selftests/futex
>>> make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
>>> Makefile:36: warning: overriding recipe for target 'clean'
>>> ../lib.mk:55: warning: ignoring old recipe for target 'clean'
>>> for DIR in functional; do		\
>>> 	BUILD_TARGET=$OUTPUT/$DIR;	\
>>> 	mkdir $BUILD_TARGET  -p;	\
>>> 	make OUTPUT=$BUILD_TARGET -C $DIR all;\
>>> done
>>> mkdir: cannot create directory ‘/functional’: Permission denied
>>>
>>> Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
>>> variable. The above make command now completes successfully.
>>>
>>> Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
>>> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
>>> Cc: linux-kselftest@vger.kernel.org
>>> Cc: bamvor.zhangjian@huawei.com
>>> Cc: Shuah Khan <shuah@kernel.org>
>>> Cc: <stable@vger.kernel.org> # 4.10.x-
>>
>> The OUTPUT support only went into v4.11-rc1, so I don't see why you need
>> a stable tag?
> 
> Git spelunking failure on my part, you are correct. Please disregard the stable
> tag.
> 
>>
>> Change looks good though.
>>
> 
> Thank you for the review.
> 

Thanks for fixing this.

Applied to linux-kselftest next after removing the stable tag.

-- Shuah

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

end of thread, other threads:[~2017-04-11 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 16:18 [PATCH] selftests/futex: Fix build error with OUTPUT variable Darren Hart
2017-03-26 12:55 ` Bamvor Zhang
2017-03-28  0:19 ` Michael Ellerman
2017-03-28  2:23   ` Darren Hart
2017-04-11 15:58     ` 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).