diff mbox series

[ARM64] selftests, arm64: add kernel headers path for tags_test

Message ID c28135c82eaf6d6e2c7e02c1ebc2b99a607d8116.1567615235.git.andreyknvl@google.com (mailing list archive)
State Mainlined
Commit bd3841cd3bd852e7363218e71e48cb473de4fc06
Headers show
Series [ARM64] selftests, arm64: add kernel headers path for tags_test | expand

Commit Message

Andrey Konovalov Sept. 4, 2019, 4:41 p.m. UTC
tags_test.c relies on PR_SET_TAGGED_ADDR_CTRL/PR_TAGGED_ADDR_ENABLE being
present in system headers. When this is not the case the build of this
test fails with undeclared identifier errors.

Fix by providing the path to the KSFT installed kernel headers in CFLAGS.

Reported-by: Cristian Marussi <cristian.marussi@arm.com>
Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 tools/testing/selftests/arm64/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Will Deacon Sept. 6, 2019, 1:51 p.m. UTC | #1
On Wed, Sep 04, 2019 at 06:41:00PM +0200, Andrey Konovalov wrote:
> tags_test.c relies on PR_SET_TAGGED_ADDR_CTRL/PR_TAGGED_ADDR_ENABLE being
> present in system headers. When this is not the case the build of this
> test fails with undeclared identifier errors.
> 
> Fix by providing the path to the KSFT installed kernel headers in CFLAGS.
> 
> Reported-by: Cristian Marussi <cristian.marussi@arm.com>
> Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> ---
>  tools/testing/selftests/arm64/Makefile | 1 +
>  1 file changed, 1 insertion(+)

Damn, I just tagged the arm64 queue for 5.4 and didn't spot this patch.

I'll queue it at -rc1 instead, if that's ok? It doesn't look urgent.

Thanks,

Will
Andrey Konovalov Sept. 6, 2019, 1:55 p.m. UTC | #2
On Fri, Sep 6, 2019 at 3:51 PM Will Deacon <will@kernel.org> wrote:
>
> On Wed, Sep 04, 2019 at 06:41:00PM +0200, Andrey Konovalov wrote:
> > tags_test.c relies on PR_SET_TAGGED_ADDR_CTRL/PR_TAGGED_ADDR_ENABLE being
> > present in system headers. When this is not the case the build of this
> > test fails with undeclared identifier errors.
> >
> > Fix by providing the path to the KSFT installed kernel headers in CFLAGS.
> >
> > Reported-by: Cristian Marussi <cristian.marussi@arm.com>
> > Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > ---
> >  tools/testing/selftests/arm64/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
>
> Damn, I just tagged the arm64 queue for 5.4 and didn't spot this patch.
>
> I'll queue it at -rc1 instead, if that's ok? It doesn't look urgent.

Sorry, I guess I should have pinged you directly.

I think it should be fine to leave it for rc1. It might cause a build
error in some kernel CI systems if they run kselftests though.
Cristian Marussi Sept. 6, 2019, 2:21 p.m. UTC | #3
On 06/09/2019 14:55, Andrey Konovalov wrote:
> On Fri, Sep 6, 2019 at 3:51 PM Will Deacon <will@kernel.org> wrote:
>>
>> On Wed, Sep 04, 2019 at 06:41:00PM +0200, Andrey Konovalov wrote:
>>> tags_test.c relies on PR_SET_TAGGED_ADDR_CTRL/PR_TAGGED_ADDR_ENABLE being
>>> present in system headers. When this is not the case the build of this
>>> test fails with undeclared identifier errors.
>>>
>>> Fix by providing the path to the KSFT installed kernel headers in CFLAGS.
>>>
>>> Reported-by: Cristian Marussi <cristian.marussi@arm.com>
>>> Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
>>> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>>> ---
>>>  tools/testing/selftests/arm64/Makefile | 1 +
>>>  1 file changed, 1 insertion(+)
>>
>> Damn, I just tagged the arm64 queue for 5.4 and didn't spot this patch.
>>
>> I'll queue it at -rc1 instead, if that's ok? It doesn't look urgent.
> 
> Sorry, I guess I should have pinged you directly.
> 
> I think it should be fine to leave it for rc1. It might cause a build
> error in some kernel CI systems if they run kselftests though.
> 

It won't be a big issue probably.

Cristian
diff mbox series

Patch

diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile
index a61b2e743e99..f9f79fb272f0 100644
--- a/tools/testing/selftests/arm64/Makefile
+++ b/tools/testing/selftests/arm64/Makefile
@@ -4,6 +4,7 @@ 
 ARCH ?= $(shell uname -m 2>/dev/null || echo not)
 
 ifneq (,$(filter $(ARCH),aarch64 arm64))
+CFLAGS += -I../../../../usr/include/
 TEST_GEN_PROGS := tags_test
 TEST_PROGS := run_tags_test.sh
 endif