From: Guillaume Tucker <guillaume.tucker@collabora.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
Shuah Khan <shuah@kernel.org>, Kees Cook <keescook@chromium.org>,
kernel@collabora.com,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 4/4] Makefile: add headers_install to kselftest targets
Date: Tue, 12 Jul 2022 09:32:36 +0100 [thread overview]
Message-ID: <5b394bca-335a-4a32-0a68-bebdb33358e8@collabora.com> (raw)
In-Reply-To: <CAK7LNASe3zQv82pQsTdWtia9nQQm8XGgs_mrUMvbLRkxa0T48Q@mail.gmail.com>
On 12/07/2022 02:35, Masahiro Yamada wrote:
> On Sat, Jul 9, 2022 at 1:23 AM Guillaume Tucker
> <guillaume.tucker@collabora.com> wrote:
>>
>> Add headers_install as a dependency to kselftest targets so that they
>> can be run directly from the top of the tree. The kselftest Makefile
>> used to try to call headers_install "backwards" but failed due to the
>> relative path not being consistent.
>>
>> Now we can either run this directly:
>>
>> $ make O=build kselftest-all
>>
>> or this:
>>
>> $ make O=build headers_install
>> $ make O=build -C tools/testing/selftest all
>>
>> The same commands work as well when building directly in the source
>> tree (no O=) or any arbitrary path (relative or absolute).
>>
>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
>> ---
>> Makefile | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 1a6678d817bd..afc9d739ba44 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1347,10 +1347,10 @@ tools/%: FORCE
>> # Kernel selftest
>>
>> PHONY += kselftest
>> -kselftest:
>> +kselftest: headers_install
>> $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
>
> Nit.
> Please use 'headers' for in-kernel use of exportedI headers.
>
> kselftest: headers
>
>
>>
>> -kselftest-%: FORCE
>> +kselftest-%: headers_install FORCE
>> $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
>
> Ditto.
>
> kselftest-%: headers FORCE
Thank you all for the reviews.
I've sent a v2 with this tweak and double-checked that the
kselftest build produced exactly the same result.
Best wishes,
Guillaume
next prev parent reply other threads:[~2022-07-12 8:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 16:23 [PATCH 0/4] Fix kselftest build with sub-directory Guillaume Tucker
2022-07-08 16:23 ` [PATCH 1/4] selftests: drop khdr make target Guillaume Tucker
2022-07-08 16:23 ` [PATCH 2/4] selftests: stop using KSFT_KHDR_INSTALL Guillaume Tucker
2022-07-08 16:23 ` [PATCH 3/4] selftests: drop KSFT_KHDR_INSTALL make target Guillaume Tucker
2022-07-08 16:23 ` [PATCH 4/4] Makefile: add headers_install to kselftest targets Guillaume Tucker
2022-07-12 1:35 ` Masahiro Yamada
2022-07-12 8:32 ` Guillaume Tucker [this message]
2022-07-13 6:38 ` Guillaume Tucker
2022-07-08 17:14 ` [PATCH 0/4] Fix kselftest build with sub-directory Shuah Khan
2022-07-08 17:37 ` Bird, Tim
2022-07-11 12:13 ` Anders Roxell
2022-07-11 23:08 ` Shuah Khan
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=5b394bca-335a-4a32-0a68-bebdb33358e8@collabora.com \
--to=guillaume.tucker@collabora.com \
--cc=keescook@chromium.org \
--cc=kernel@collabora.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--cc=shuah@kernel.org \
/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