* [PATCH] kselftest/arm64: Fix ABI header directory location
@ 2022-05-03 23:16 Mark Brown
2022-05-04 9:02 ` Catalin Marinas
2022-05-04 19:57 ` Catalin Marinas
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2022-05-03 23:16 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Shuah Khan
Cc: linux-arm-kernel, linux-kselftest, Mark Brown
Currently the arm64 kselftests attempt to locate the ABI headers using
custom logic which doesn't work correctly in the case of out of tree builds
if KBUILD_OUTPUT is not specified. Since lib.mk defines KHDR_INCLUDES with
the appropriate flags we can simply remove the custom logic and use that
instead.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
This fix is required to get us able to run the arm64 kselftests
in KernelCI, it does out of tree kselftest builds triggering the
issue especially in conjunction with the addition of the new
definitions for SME.
tools/testing/selftests/arm64/Makefile | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile
index 1e8d9a8f59df..9460cbe81bcc 100644
--- a/tools/testing/selftests/arm64/Makefile
+++ b/tools/testing/selftests/arm64/Makefile
@@ -17,16 +17,7 @@ top_srcdir = $(realpath ../../../../)
# Additional include paths needed by kselftest.h and local headers
CFLAGS += -I$(top_srcdir)/tools/testing/selftests/
-# Guessing where the Kernel headers could have been installed
-# depending on ENV config
-ifeq ($(KBUILD_OUTPUT),)
-khdr_dir = $(top_srcdir)/usr/include
-else
-# the KSFT preferred location when KBUILD_OUTPUT is set
-khdr_dir = $(KBUILD_OUTPUT)/kselftest/usr/include
-endif
-
-CFLAGS += -I$(khdr_dir)
+CFLAGS += $(KHDR_INCLUDES)
export CFLAGS
export top_srcdir
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix ABI header directory location
2022-05-03 23:16 [PATCH] kselftest/arm64: Fix ABI header directory location Mark Brown
@ 2022-05-04 9:02 ` Catalin Marinas
2022-05-04 19:57 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2022-05-04 9:02 UTC (permalink / raw)
To: Mark Brown; +Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest
On Wed, May 04, 2022 at 12:16:55AM +0100, Mark Brown wrote:
> Currently the arm64 kselftests attempt to locate the ABI headers using
> custom logic which doesn't work correctly in the case of out of tree builds
> if KBUILD_OUTPUT is not specified. Since lib.mk defines KHDR_INCLUDES with
> the appropriate flags we can simply remove the custom logic and use that
> instead.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>
> This fix is required to get us able to run the arm64 kselftests
> in KernelCI, it does out of tree kselftest builds triggering the
> issue especially in conjunction with the addition of the new
> definitions for SME.
>
> tools/testing/selftests/arm64/Makefile | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile
> index 1e8d9a8f59df..9460cbe81bcc 100644
> --- a/tools/testing/selftests/arm64/Makefile
> +++ b/tools/testing/selftests/arm64/Makefile
> @@ -17,16 +17,7 @@ top_srcdir = $(realpath ../../../../)
> # Additional include paths needed by kselftest.h and local headers
> CFLAGS += -I$(top_srcdir)/tools/testing/selftests/
>
> -# Guessing where the Kernel headers could have been installed
> -# depending on ENV config
> -ifeq ($(KBUILD_OUTPUT),)
> -khdr_dir = $(top_srcdir)/usr/include
> -else
> -# the KSFT preferred location when KBUILD_OUTPUT is set
> -khdr_dir = $(KBUILD_OUTPUT)/kselftest/usr/include
> -endif
> -
> -CFLAGS += -I$(khdr_dir)
> +CFLAGS += $(KHDR_INCLUDES)
Great, thanks. I had exactly the same diff stashed last week when
testing the kselftest branch, just forgot about posting it. I'll apply
yours.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix ABI header directory location
2022-05-03 23:16 [PATCH] kselftest/arm64: Fix ABI header directory location Mark Brown
2022-05-04 9:02 ` Catalin Marinas
@ 2022-05-04 19:57 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2022-05-04 19:57 UTC (permalink / raw)
To: Shuah Khan, Will Deacon, Mark Brown; +Cc: linux-kselftest, linux-arm-kernel
On Wed, 4 May 2022 00:16:55 +0100, Mark Brown wrote:
> Currently the arm64 kselftests attempt to locate the ABI headers using
> custom logic which doesn't work correctly in the case of out of tree builds
> if KBUILD_OUTPUT is not specified. Since lib.mk defines KHDR_INCLUDES with
> the appropriate flags we can simply remove the custom logic and use that
> instead.
>
>
> [...]
Applied to arm64 (for-next/kselftest), thanks!
[1/1] kselftest/arm64: Fix ABI header directory location
https://git.kernel.org/arm64/c/ae60e0763e97
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-04 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-03 23:16 [PATCH] kselftest/arm64: Fix ABI header directory location Mark Brown
2022-05-04 9:02 ` Catalin Marinas
2022-05-04 19:57 ` Catalin Marinas
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).