diff mbox series

[01/34] selftests: arm64: Fix incorrect kernel headers search path

Message ID 20230127135755.79929-2-mathieu.desnoyers@efficios.com
State Accepted
Commit 7482c19173b7eb044d476b3444d7ee55bc669d03
Headers show
Series selftests: Fix incorrect kernel headers search path | expand

Commit Message

Mathieu Desnoyers Jan. 27, 2023, 1:57 p.m. UTC
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org>    [5.18+]
---
 tools/testing/selftests/arm64/fp/Makefile   | 2 +-
 tools/testing/selftests/arm64/tags/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Shuah Khan Jan. 30, 2023, 4:09 p.m. UTC | #1
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
> building against kernel headers from the build environment in scenarios
> where kernel headers are installed into a specific output directory
> (O=...).
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org>    [5.18+]
> ---
>   tools/testing/selftests/arm64/fp/Makefile   | 2 +-
>   tools/testing/selftests/arm64/tags/Makefile | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 

Adding arm maintainers.

Would you me to take this patch through kselftest tree? If you
decide to take this through yours:

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah
Catalin Marinas Jan. 30, 2023, 5:14 p.m. UTC | #2
Hi Shuah,

On Mon, Jan 30, 2023 at 09:09:42AM -0700, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
> > building against kernel headers from the build environment in scenarios
> > where kernel headers are installed into a specific output directory
> > (O=...).
> > 
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: <stable@vger.kernel.org>    [5.18+]
> > ---
> >   tools/testing/selftests/arm64/fp/Makefile   | 2 +-
> >   tools/testing/selftests/arm64/tags/Makefile | 2 +-
> >   2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> Adding arm maintainers.
> 
> Would you me to take this patch through kselftest tree? If you
> decide to take this through yours:

Are you taking the whole series? If yes:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

(otherwise I can pick this up)
diff mbox series

Patch

diff --git a/tools/testing/selftests/arm64/fp/Makefile b/tools/testing/selftests/arm64/fp/Makefile
index 36db61358ed5..932ec8792316 100644
--- a/tools/testing/selftests/arm64/fp/Makefile
+++ b/tools/testing/selftests/arm64/fp/Makefile
@@ -3,7 +3,7 @@ 
 # A proper top_srcdir is needed by KSFT(lib.mk)
 top_srcdir = $(realpath ../../../../../)
 
-CFLAGS += -I$(top_srcdir)/usr/include/
+CFLAGS += $(KHDR_INCLUDES)
 
 TEST_GEN_PROGS := fp-stress \
 	sve-ptrace sve-probe-vls \
diff --git a/tools/testing/selftests/arm64/tags/Makefile b/tools/testing/selftests/arm64/tags/Makefile
index 41cb75070511..6d29cfde43a2 100644
--- a/tools/testing/selftests/arm64/tags/Makefile
+++ b/tools/testing/selftests/arm64/tags/Makefile
@@ -1,6 +1,6 @@ 
 # SPDX-License-Identifier: GPL-2.0
 
-CFLAGS += -I../../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
 TEST_GEN_PROGS := tags_test
 TEST_PROGS := run_tags_test.sh