From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Michal Marek <mmarek@suse.com>,
shuah@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
bamvor.zhangjian@linaro.org, emilio.lopez@collabora.co.uk,
Jonathan Corbet <corbet@lwn.net>,
tytso@mit.edu, ebiederm@xmission.com, Tim.Bird@sony.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 01/11] Makefile: kselftest and kselftest-clean fail for make O=dir case
Date: Wed, 20 Sep 2017 12:39:10 +0900 [thread overview]
Message-ID: <CAK7LNAQUMCd8QMn9WfZxPUyy-g1BrWvnKxZVELqZGjtCuVWApQ@mail.gmail.com> (raw)
In-Reply-To: <c5600059-fc62-0ceb-d730-95d94c9a625d@osg.samsung.com>
2017-09-19 8:14 GMT+09:00 Shuah Khan <shuahkh@osg.samsung.com>:
> On 09/12/2017 05:52 PM, Shuah Khan wrote:
>> 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>
>
> Hi Masahiro/Michal,
>
> Is it okay to take this patch via linux-kselftest git? If you are okay
> with that, please Ack it and I will plan to include this in my update.
>
> thanks,
> -- Shuah
>
>
>> ---
>> Makefile | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index eccb8d704c23..6a85322d0b3e 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1180,13 +1180,18 @@ headers_check: headers_install
>> # ---------------------------------------------------------------------------
>> # Kernel selftest
>>
>> +PHONY += __kselftest
>> + kselftest_src := tools/testing/selftests
>> + ifneq ($(KBUILD_SRC),)
>> + kselftest_src := $(KBUILD_SRC)/tools/testing/selftests
>> + endif
>> PHONY += kselftest
>> -kselftest:
>> - $(Q)$(MAKE) -C tools/testing/selftests run_tests
>> +kselftest: __kselftest
>> + $(Q)$(MAKE) -C $(kselftest_src) run_tests
>>
>> PHONY += kselftest-clean
>> -kselftest-clean:
>> - $(Q)$(MAKE) -C tools/testing/selftests clean
>> +kselftest-clean: __kselftest
>> + $(Q)$(MAKE) -C $(kselftest_src) clean
>>
>> PHONY += kselftest-merge
>> kselftest-merge:
>>
>
Why don't you simply add $(srctree)/ to tools/testing/selftests?
Like,
PHONY += kselftest
kselftest:
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
PHONY += kselftest-clean
kselftest-clean:
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2017-09-20 3:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 23:52 [PATCH 00/11] Kselftest make O=dir work Shuah Khan
2017-09-12 23:52 ` [PATCH 01/11] Makefile: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
2017-09-18 23:14 ` Shuah Khan
2017-09-20 3:39 ` Masahiro Yamada [this message]
2017-09-20 17:30 ` Shuah Khan
2017-09-12 23:52 ` [PATCH 02/11] selftests: lib.mk: " Shuah Khan
2017-09-12 23:52 ` [PATCH 03/11] selftests: Makefile: clear LDFLAGS for make O=dir use-case Shuah Khan
2017-09-12 23:52 ` [PATCH 04/11] selftests: lib.mk: fix test executable status check to use full path Shuah Khan
2017-09-12 23:52 ` [PATCH 05/11] selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean Shuah Khan
2017-09-12 23:52 ` [PATCH 06/11] selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test run/install Shuah Khan
2017-09-12 23:53 ` [PATCH 07/11] selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS Shuah Khan
2017-09-12 23:53 ` [PATCH 08/11] selftests: sync: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
2017-09-12 23:53 ` [PATCH 09/11] selftests: lib.mk: copy test scripts and test files for make O=dir run Shuah Khan
2017-09-13 18:14 ` Bird, Timothy
2017-09-13 19:43 ` Shuah Khan
2017-09-12 23:53 ` [PATCH 10/11] selftests: futex: copy sub-dir test scripts " Shuah Khan
2017-09-13 18:15 ` Bird, Timothy
2017-09-23 0:36 ` Darren Hart
2017-09-12 23:53 ` [PATCH 11/11] selftests: mqueue: Use full path to run tests from Makefile Shuah Khan
2017-09-13 0:58 ` [PATCH 00/11] Kselftest make O=dir work Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK7LNAQUMCd8QMn9WfZxPUyy-g1BrWvnKxZVELqZGjtCuVWApQ@mail.gmail.com \
--to=yamada.masahiro@socionext.com \
--cc=Tim.Bird@sony.com \
--cc=bamvor.zhangjian@linaro.org \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=emilio.lopez@collabora.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mmarek@suse.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).