From: Guillaume Tucker <guillaume.tucker@collabora.com>
To: Anders Roxell <anders.roxell@linaro.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
Shuah Khan <shuah@kernel.org>, Kees Cook <keescook@chromium.org>,
Tim.Bird@sony.com, kernel@collabora.com,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 3/4] selftests: drop KSFT_KHDR_INSTALL make target
Date: Tue, 12 Jul 2022 15:57:56 +0100 [thread overview]
Message-ID: <950e172d-b45b-af70-972b-146c10b69714@collabora.com> (raw)
In-Reply-To: <CADYN=9L6-ESg=mxAwXCPwcO1RTE1S5DvigpvL13+tLMWs0wB-g@mail.gmail.com>
On 12/07/2022 10:59, Anders Roxell wrote:
> On Tue, 12 Jul 2022 at 10:29, Guillaume Tucker
> <guillaume.tucker@collabora.com> wrote:
>>
>> Drop the KSFT_KHDR_INSTALL make target now that all use-cases have
>> been removed from the other kselftest Makefiles.
>>
>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
>> ---
>> tools/testing/selftests/Makefile | 1 -
>> tools/testing/selftests/lib.mk | 38 --------------------------------
>> 2 files changed, 39 deletions(-)
>>
>> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
>> index 619451e82863..e060777239a4 100644
>> --- a/tools/testing/selftests/Makefile
>> +++ b/tools/testing/selftests/Makefile
>> @@ -143,7 +143,6 @@ endif
>> # Prepare for headers install
>> include $(top_srcdir)/scripts/subarch.include
>> ARCH ?= $(SUBARCH)
>> -export KSFT_KHDR_INSTALL_DONE := 1
>> export BUILD
>> export KHDR_INCLUDES
>>
>> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
>> index 2a2d240cdc1b..df5f853951f2 100644
>> --- a/tools/testing/selftests/lib.mk
>> +++ b/tools/testing/selftests/lib.mk
>> @@ -30,45 +30,7 @@ TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS))
>> TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED))
>> TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES))
>>
>> -ifdef KSFT_KHDR_INSTALL
>> -top_srcdir ?= ../../../..
>> -include $(top_srcdir)/scripts/subarch.include
>> -ARCH ?= $(SUBARCH)
>> -
>> -# set default goal to all, so make without a target runs all, even when
>> -# all isn't the first target in the file.
>> -.DEFAULT_GOAL := all
>> -
>> -# Invoke headers install with --no-builtin-rules to avoid circular
>> -# dependency in "make kselftest" case. In this case, second level
>> -# make inherits builtin-rules which will use the rule generate
>> -# Makefile.o and runs into
>> -# "Circular Makefile.o <- prepare dependency dropped."
>> -# and headers_install fails and test compile fails.
>> -# O= KBUILD_OUTPUT cases don't run into this error, since main Makefile
>> -# invokes them as sub-makes and --no-builtin-rules is not necessary,
>> -# but doesn't cause any failures. Keep it simple and use the same
>> -# flags in both cases.
>> -# Note that the support to install headers from lib.mk is necessary
>> -# when test Makefile is run directly with "make -C".
>> -# When local build is done, headers are installed in the default
>> -# INSTALL_HDR_PATH usr/include.
>> -.PHONY: khdr
>> -.NOTPARALLEL:
>> -khdr:
>> -ifndef KSFT_KHDR_INSTALL_DONE
>> -ifeq (1,$(DEFAULT_INSTALL_HDR_PATH))
>> - $(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
>> -else
>> - $(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \
>> - ARCH=$(ARCH) -C $(top_srcdir) headers_install
>> -endif
>> -endif
>> -
>> -all: khdr $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
>> -else
>> all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
>> -endif
>>
>> define RUN_TESTS
>> BASE_DIR="$(selfdir)"; \
>
> Should this be removed as well, since 'khdr' gets droped from file the lib.mk ?
>
> diff --git a/tools/testing/selftests/landlock/Makefile
> b/tools/testing/selftests/landlock/Makefile
> index 1313e44e8fb9..99f88c52d61a 100644
> --- a/tools/testing/selftests/landlock/Makefile
> +++ b/tools/testing/selftests/landlock/Makefile
> @@ -13,9 +13,6 @@ include ../lib.mk
>
> khdr_dir = $(top_srcdir)/usr/include
>
> -$(khdr_dir)/linux/landlock.h: khdr
> - @:
> -
> $(OUTPUT)/true: true.c
> $(LINK.c) $< $(LDLIBS) -o $@ -static
Good point, however I think I'll drop it in PATCH 1/4 "selftests:
drop khdr make target" as it's already dropped there. Ideally,
the khdr dependency mentioned in this PATCH 3/4 should probably
also be removed in PATCH 1/4. I'll send a v3 with this.
Thanks,
Guillaume
next prev parent reply other threads:[~2022-07-12 14:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 8:29 [PATCH v2 0/4] Fix kselftest build with sub-directory Guillaume Tucker
2022-07-12 8:29 ` [PATCH v2 1/4] selftests: drop khdr make target Guillaume Tucker
2022-07-12 8:29 ` [PATCH v2 2/4] selftests: stop using KSFT_KHDR_INSTALL Guillaume Tucker
2022-07-12 8:29 ` [PATCH v2 3/4] selftests: drop KSFT_KHDR_INSTALL make target Guillaume Tucker
2022-07-12 9:59 ` Anders Roxell
2022-07-12 14:57 ` Guillaume Tucker [this message]
2022-07-12 8:29 ` [PATCH v2 4/4] Makefile: add headers to kselftest targets Guillaume Tucker
2022-07-13 9:09 ` Nicolas Schier
2022-07-13 13:04 ` Guillaume Tucker
2022-07-13 2:27 ` [PATCH v2 0/4] Fix kselftest build with sub-directory 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=950e172d-b45b-af70-972b-146c10b69714@collabora.com \
--to=guillaume.tucker@collabora.com \
--cc=Tim.Bird@sony.com \
--cc=anders.roxell@linaro.org \
--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
all inboxes | Powered by JetHome®