* [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case
@ 2017-09-20 17:32 Shuah Khan
2017-09-21 1:14 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2017-09-20 17:32 UTC (permalink / raw)
To: yamada.masahiro, mmarek, shuah, tglx, mingo, peterz,
bamvor.zhangjian, emilio.lopez, corbet
Cc: Shuah Khan, tytso, ebiederm, Tim.Bird, gregkh, linux-kbuild,
linux-kernel, linux-kselftest
kselftest and kselftest-clean targets fail when object directory is
specified to relocate objects. Fix it so it can find the source tree
to build from.
make O=/tmp/kselftest_top kselftest
make[1]: Entering directory '/tmp/kselftest_top'
make[2]: Entering directory '/tmp/kselftest_top'
make[2]: *** tools/testing/selftests: No such file or directory. Stop.
make[2]: Leaving directory '/tmp/kselftest_top'
./linux-kselftest/Makefile:1185: recipe for target
'kselftest' failed
make[1]: *** [kselftest] Error 2
make[1]: Leaving directory '/tmp/kselftest_top'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
Changes v1 - V2: Simplify logic - use $(srctree)
Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 64cbc66cebca..7735fc32b24e 100644
--- a/Makefile
+++ b/Makefile
@@ -1169,14 +1169,13 @@ headers_check: headers_install
# ---------------------------------------------------------------------------
# Kernel selftest
-
PHONY += kselftest
kselftest:
- $(Q)$(MAKE) -C tools/testing/selftests run_tests
+ $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
PHONY += kselftest-clean
kselftest-clean:
- $(Q)$(MAKE) -C tools/testing/selftests clean
+ $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
PHONY += kselftest-merge
kselftest-merge:
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case
2017-09-20 17:32 [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
@ 2017-09-21 1:14 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-09-21 1:14 UTC (permalink / raw)
To: Shuah Khan
Cc: Michal Marek, shuah, Thomas Gleixner, Ingo Molnar,
Peter Zijlstra (Intel),
Bamvor Zhang Jian, emilio.lopez, Jonathan Corbet,
Theodore Ts'o, ebiederm, Tim.Bird, Greg Kroah-Hartman,
Linux Kbuild mailing list, Linux Kernel Mailing List,
linux-kselftest
2017-09-21 2:32 GMT+09:00 Shuah Khan <shuahkh@osg.samsung.com>:
> kselftest and kselftest-clean targets fail when object directory is
> specified to relocate objects. Fix it so it can find the source tree
> to build from.
>
> make O=/tmp/kselftest_top kselftest
>
> make[1]: Entering directory '/tmp/kselftest_top'
> make[2]: Entering directory '/tmp/kselftest_top'
> make[2]: *** tools/testing/selftests: No such file or directory. Stop.
> make[2]: Leaving directory '/tmp/kselftest_top'
> ./linux-kselftest/Makefile:1185: recipe for target
> 'kselftest' failed
> make[1]: *** [kselftest] Error 2
> make[1]: Leaving directory '/tmp/kselftest_top'
> Makefile:145: recipe for target 'sub-make' failed
> make: *** [sub-make] Error 2
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> Changes v1 - V2: Simplify logic - use $(srctree)
>
> Makefile | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 64cbc66cebca..7735fc32b24e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1169,14 +1169,13 @@ headers_check: headers_install
>
> # ---------------------------------------------------------------------------
> # Kernel selftest
> -
> PHONY += kselftest
> kselftest:
> - $(Q)$(MAKE) -C tools/testing/selftests run_tests
> + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
>
> PHONY += kselftest-clean
> kselftest-clean:
> - $(Q)$(MAKE) -C tools/testing/selftests clean
> + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
>
> PHONY += kselftest-merge
> kselftest-merge:
> --
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-21 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 17:32 [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
2017-09-21 1:14 ` Masahiro Yamada
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).