* [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
@ 2024-02-15 16:55 Michal Suchanek
2024-02-15 19:13 ` Nathan Lynch
0 siblings, 1 reply; 6+ messages in thread
From: Michal Suchanek @ 2024-02-15 16:55 UTC (permalink / raw)
To: linuxppc-dev
Cc: Nathan Lynch, Michal Suchanek, linux-kernel, Aneesh Kumar K.V,
Nicholas Piggin, linux-kselftest, Naveen N. Rao, root, Shuah Khan
From: root <root@jostaberry-6.arch.suse.de>
Without the headers the tests don't build.
Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
3 files changed, 3 insertions(+)
create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-vpd.h
diff --git a/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h b/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
new file mode 120000
index 000000000000..0f811020354d
--- /dev/null
+++ b/tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
@@ -0,0 +1 @@
+../../../../../../arch/powerpc/include/uapi/asm/papr-miscdev.h
\ No newline at end of file
diff --git a/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h b/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
new file mode 120000
index 000000000000..6355e122245e
--- /dev/null
+++ b/tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
@@ -0,0 +1 @@
+../../../../../../arch/powerpc/include/uapi/asm/papr-sysparm.h
\ No newline at end of file
diff --git a/tools/testing/selftests/powerpc/include/asm/papr-vpd.h b/tools/testing/selftests/powerpc/include/asm/papr-vpd.h
new file mode 120000
index 000000000000..403ddec6b422
--- /dev/null
+++ b/tools/testing/selftests/powerpc/include/asm/papr-vpd.h
@@ -0,0 +1 @@
+../../../../../../arch/powerpc/include/uapi/asm/papr-vpd.h
\ No newline at end of file
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
2024-02-15 16:55 [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests Michal Suchanek
@ 2024-02-15 19:13 ` Nathan Lynch
2024-02-15 19:23 ` Michal Suchánek
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Lynch @ 2024-02-15 19:13 UTC (permalink / raw)
To: Michal Suchanek, linuxppc-dev
Cc: linux-kernel, Aneesh Kumar K.V, Nicholas Piggin, linux-kselftest,
Naveen N. Rao, Michal Suchanek, Shuah Khan
Michal Suchanek <msuchanek@suse.de> writes:
>
> Without the headers the tests don't build.
>
> Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
> Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
> tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
> tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
> 3 files changed, 3 insertions(+)
> create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
> create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
> create mode 120000
> tools/testing/selftests/powerpc/include/asm/papr-vpd.h
I really hope making symlinks into the kernel source isn't necessary. I
haven't experienced build failures with these tests. How are you
building them?
I usually do something like (on a x86 build host):
$ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig
$ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers
$ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/
without issue.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
2024-02-15 19:13 ` Nathan Lynch
@ 2024-02-15 19:23 ` Michal Suchánek
2024-02-15 19:39 ` Nathan Lynch
0 siblings, 1 reply; 6+ messages in thread
From: Michal Suchánek @ 2024-02-15 19:23 UTC (permalink / raw)
To: Nathan Lynch
Cc: Shuah Khan, linux-kernel, Aneesh Kumar K.V, Nicholas Piggin,
linux-kselftest, Naveen N. Rao, linuxppc-dev
On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote:
> Michal Suchanek <msuchanek@suse.de> writes:
> >
> > Without the headers the tests don't build.
> >
> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
> > 3 files changed, 3 insertions(+)
> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
> > create mode 120000
> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h
>
> I really hope making symlinks into the kernel source isn't necessary. I
> haven't experienced build failures with these tests. How are you
> building them?
>
> I usually do something like (on a x86 build host):
>
> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig
> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers
> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/
>
> without issue.
I am not configuring the kernel, only building the tests, and certainly
not installing headers on the system.
Apparently this is what people aim to do, and report bugs when it does
not work: build the kselftests as self-contained testsuite that relies
only on standard libc, and whatever it brought in the sources.
That said, the target to install headers is headers_install, not
headers. The headers target is not documented, it's probably meant to be
internal to the build system. Yet it is not enforced that it is built
before building the selftests.
Thanks
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
2024-02-15 19:23 ` Michal Suchánek
@ 2024-02-15 19:39 ` Nathan Lynch
2024-02-15 21:50 ` Michal Suchánek
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Lynch @ 2024-02-15 19:39 UTC (permalink / raw)
To: Michal Suchánek
Cc: Shuah Khan, linux-kernel, Aneesh Kumar K.V, Nicholas Piggin,
linux-kselftest, Naveen N. Rao, linuxppc-dev
Michal Suchánek <msuchanek@suse.de> writes:
> On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote:
>> Michal Suchanek <msuchanek@suse.de> writes:
>> >
>> > Without the headers the tests don't build.
>> >
>> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
>> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
>> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
>> > ---
>> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
>> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
>> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
>> > 3 files changed, 3 insertions(+)
>> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
>> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
>> > create mode 120000
>> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h
>>
>> I really hope making symlinks into the kernel source isn't necessary. I
>> haven't experienced build failures with these tests. How are you
>> building them?
>>
>> I usually do something like (on a x86 build host):
>>
>> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig
>> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers
>> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/
>>
>> without issue.
>
> I am not configuring the kernel, only building the tests, and certainly
> not installing headers on the system.
OK, but again: how do you provoke the build errors, exactly? Don't make
us guess please.
> Apparently this is what people aim to do, and report bugs when it does
> not work: build the kselftests as self-contained testsuite that relies
> only on standard libc, and whatever it brought in the sources.
>
> That said, the target to install headers is headers_install, not
> headers. The headers target is not documented, it's probably meant to be
> internal to the build system. Yet it is not enforced that it is built
> before building the selftests.
<shrug> the headers target is used in Documentation/dev-tools/kselftest.rst:
"""
To build the tests::
$ make headers
$ make -C tools/testing/selftests
"""
This is what I've been following.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
2024-02-15 19:39 ` Nathan Lynch
@ 2024-02-15 21:50 ` Michal Suchánek
2024-02-19 4:29 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Michal Suchánek @ 2024-02-15 21:50 UTC (permalink / raw)
To: Nathan Lynch
Cc: Shuah Khan, linux-kernel, Aneesh Kumar K.V, Nicholas Piggin,
linux-kselftest, Naveen N. Rao, linuxppc-dev
On Thu, Feb 15, 2024 at 01:39:27PM -0600, Nathan Lynch wrote:
> Michal Suchánek <msuchanek@suse.de> writes:
> > On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote:
> >> Michal Suchanek <msuchanek@suse.de> writes:
> >> >
> >> > Without the headers the tests don't build.
> >> >
> >> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
> >> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
> >> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> >> > ---
> >> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
> >> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
> >> > 3 files changed, 3 insertions(+)
> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
> >> > create mode 120000
> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h
> >>
> >> I really hope making symlinks into the kernel source isn't necessary. I
> >> haven't experienced build failures with these tests. How are you
> >> building them?
> >>
> >> I usually do something like (on a x86 build host):
> >>
> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig
> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers
> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/
> >>
> >> without issue.
> >
> > I am not configuring the kernel, only building the tests, and certainly
> > not installing headers on the system.
>
> OK, but again: how do you provoke the build errors, exactly? Don't make
> us guess please.
cd tools/testing/selftests/powerpc/
make -k
> > Apparently this is what people aim to do, and report bugs when it does
> > not work: build the kselftests as self-contained testsuite that relies
> > only on standard libc, and whatever it brought in the sources.
> >
> > That said, the target to install headers is headers_install, not
> > headers. The headers target is not documented, it's probably meant to be
> > internal to the build system. Yet it is not enforced that it is built
> > before building the selftests.
>
> <shrug> the headers target is used in Documentation/dev-tools/kselftest.rst:
>
> """
> To build the tests::
>
> $ make headers
> $ make -C tools/testing/selftests
> """
Indeed so it's not supposed to work otherwise. It would be nice if it
did but might be difficult to achieve with plain makefiles.
'headers' is not in 'make help' output but whatever.
Thanks
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests
2024-02-15 21:50 ` Michal Suchánek
@ 2024-02-19 4:29 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2024-02-19 4:29 UTC (permalink / raw)
To: Michal Suchánek, Nathan Lynch
Cc: linuxppc-dev, linux-kernel, Aneesh Kumar K.V, Nicholas Piggin,
linux-kselftest, Naveen N. Rao, Shuah Khan
Michal Suchánek <msuchanek@suse.de> writes:
> On Thu, Feb 15, 2024 at 01:39:27PM -0600, Nathan Lynch wrote:
>> Michal Suchánek <msuchanek@suse.de> writes:
>> > On Thu, Feb 15, 2024 at 01:13:34PM -0600, Nathan Lynch wrote:
>> >> Michal Suchanek <msuchanek@suse.de> writes:
>> >> >
>> >> > Without the headers the tests don't build.
>> >> >
>> >> > Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")
>> >> > Fixes: 76b2ec3faeaa ("powerpc/selftests: Add test for papr-sysparm")
>> >> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
>> >> > ---
>> >> > tools/testing/selftests/powerpc/include/asm/papr-miscdev.h | 1 +
>> >> > tools/testing/selftests/powerpc/include/asm/papr-sysparm.h | 1 +
>> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h | 1 +
>> >> > 3 files changed, 3 insertions(+)
>> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-miscdev.h
>> >> > create mode 120000 tools/testing/selftests/powerpc/include/asm/papr-sysparm.h
>> >> > create mode 120000
>> >> > tools/testing/selftests/powerpc/include/asm/papr-vpd.h
>> >>
>> >> I really hope making symlinks into the kernel source isn't necessary. I
>> >> haven't experienced build failures with these tests. How are you
>> >> building them?
>> >>
>> >> I usually do something like (on a x86 build host):
>> >>
>> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- ppc64le_defconfig
>> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- headers
>> >> $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- -C tools/testing/selftests/powerpc/
>> >>
>> >> without issue.
>> >
>> > I am not configuring the kernel, only building the tests, and certainly
>> > not installing headers on the system.
>>
>> OK, but again: how do you provoke the build errors, exactly? Don't make
>> us guess please.
>
> cd tools/testing/selftests/powerpc/
>
> make -k
>
>> > Apparently this is what people aim to do, and report bugs when it does
>> > not work: build the kselftests as self-contained testsuite that relies
>> > only on standard libc, and whatever it brought in the sources.
>> >
>> > That said, the target to install headers is headers_install, not
>> > headers. The headers target is not documented, it's probably meant to be
>> > internal to the build system. Yet it is not enforced that it is built
>> > before building the selftests.
>>
>> <shrug> the headers target is used in Documentation/dev-tools/kselftest.rst:
>>
>> """
>> To build the tests::
>>
>> $ make headers
>> $ make -C tools/testing/selftests
>> """
>
> Indeed so it's not supposed to work otherwise. It would be nice if it
> did but might be difficult to achieve with plain makefiles.
It used to work without the headers, but at some point folks decided it
was causing too many problems and building the headers was made mandatory.
Note that by default they aren't installed globally, they just end up in
$KBUILD_OUTPUT/usr/include. So it shouldn't affect the host system.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-19 4:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 16:55 [PATCH] selftests: powerpc: Add header symlinks for building papr character device tests Michal Suchanek
2024-02-15 19:13 ` Nathan Lynch
2024-02-15 19:23 ` Michal Suchánek
2024-02-15 19:39 ` Nathan Lynch
2024-02-15 21:50 ` Michal Suchánek
2024-02-19 4:29 ` Michael Ellerman
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).