From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Xi Ruoyao <xry111@xry111.site>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
Jinyang He <hejinyang@loongson.cn>,
Tiezhu Yang <yangtiezhu@loongson.cn>,
Arnd Bergmann <arnd@arndb.de>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v4 3/4] selftests/vDSO: Use KHDR_INCLUDES to locate UAPI headers for vdso_test_getrandom
Date: Tue, 27 Aug 2024 17:00:32 +0200 [thread overview]
Message-ID: <Zs3qEMQOv5MAipox@zx2c4.com> (raw)
In-Reply-To: <0730ca3a-e158-44ea-bb9e-1a7716b45360@csgroup.eu>
On Tue, Aug 27, 2024 at 04:50:59PM +0200, Christophe Leroy wrote:
>
>
> Le 27/08/2024 à 16:41, Xi Ruoyao a écrit :
> > On Tue, 2024-08-27 at 16:15 +0200, Jason A. Donenfeld wrote:
> >
> > /* snip */
> >
> >> gcc -std=gnu99 -D_GNU_SOURCE= -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/include -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../usr/include vdso_test_getrandom.c parse_vdso.c -o /home/zx2c4/Projects/random-linux/tools/testing/selftests/vDSO/vdso_test_getrandom
> >> vdso_test_getrandom.c:43:41: error: field ‘params’ has incomplete type
> >> 43 | struct vgetrandom_opaque_params params;
> >> | ^~~~~~
> >>
> >> $ ls /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../usr/include
> >> headers_check.pl Makefile
> >>
> >> Since I don't build in there, this directory is empty.
> >
> > In the toplevel Makefile:
> >
> > kselftest-%: headers FORCE
> > $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
> >
> > So running "make kselftest-all" to build the self tests should have
> > already caused make to build the "headers" target, which puts the
> > headers into usr/include.
> >
> > I don't think it's supported to build self tests w/o invoking the
> > toplevel Makefile: many other self tests use KHDR_INCLUDES as well, so
> > generally building with something like "make -C tools/testing/selftests"
> > just won't work.
> >
>
> My usr/include/ is also empty (only Makefile and headers_check.pl) and
> building directly in tools/testing/selftests/vDSO works for me.
>
> The command is:
>
> ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= -isystem
> /home/chleroy/linux-powerpc/tools/testing/selftests/../../../tools/include
> -isystem
> /home/chleroy/linux-powerpc/tools/testing/selftests/../../../include/uapi
> vdso_test_getrandom.c parse_vdso.c -o
> /home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_getrandom
>
> I believe I get the needed headers through : -isystem
> /home/chleroy/linux-powerpc/tools/testing/selftests/../../../include/uapi
The effect of this patch is to replace include/uapi with usr/include, so
it will break for you too.
What I'm wondering is why yours and mine work like that, while Ruoyao's
breaks. He makes a good argument as to why this patch is the "right
way", even if it breaks our workflow...
>
> Christophe
>
> PS: By the way, did you see the -DBULID_VDSO for the chacha test ? Don't
> know the impact though ....
Yes and https://lore.kernel.org/all/20240827145454.3317093-1-Jason@zx2c4.com/
next prev parent reply other threads:[~2024-08-27 15:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240827132018.88854-1-xry111@xry111.site>
[not found] ` <20240827132018.88854-4-xry111@xry111.site>
2024-08-27 13:58 ` [PATCH v4 3/4] selftests/vDSO: Use KHDR_INCLUDES to locate UAPI headers for vdso_test_getrandom Jason A. Donenfeld
2024-08-27 14:07 ` LEROY Christophe
2024-08-27 14:15 ` Jason A. Donenfeld
2024-08-27 14:41 ` Xi Ruoyao
2024-08-27 14:50 ` Christophe Leroy
2024-08-27 15:00 ` Jason A. Donenfeld [this message]
2024-08-27 15:05 ` Xi Ruoyao
2024-08-27 15:10 ` Jason A. Donenfeld
2024-08-27 15:28 ` Xi Ruoyao
2024-08-27 15:29 ` Jason A. Donenfeld
2024-08-28 11:36 ` Jason A. Donenfeld
2024-08-28 12:00 ` Xi Ruoyao
2024-08-27 15:12 ` Christophe Leroy
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=Zs3qEMQOv5MAipox@zx2c4.com \
--to=jason@zx2c4.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=hejinyang@loongson.cn \
--cc=kernel@xen0n.name \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=xry111@xry111.site \
--cc=yangtiezhu@loongson.cn \
/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