From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: David Vernet <void@manifault.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Artem Savkov <asavkov@redhat.com>
Subject: Re: [PATCHv3 bpf-next 1/9] selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h
Date: Thu, 9 Feb 2023 09:45:25 +0100 [thread overview]
Message-ID: <Y+SypX3Ox1kD0Ew+@krava> (raw)
In-Reply-To: <CAEf4BzbQdpgkBjqK2eO53ZkLb5Zy0n3oVj9en10kO8JH2ANYHA@mail.gmail.com>
On Wed, Feb 08, 2023 at 04:20:13PM -0800, Andrii Nakryiko wrote:
SNIP
> > > diff --git a/tools/testing/selftests/bpf/progs/cb_refs.c b/tools/testing/selftests/bpf/progs/cb_refs.c
> > > index 7653df1bc787..823901c1b839 100644
> > > --- a/tools/testing/selftests/bpf/progs/cb_refs.c
> > > +++ b/tools/testing/selftests/bpf/progs/cb_refs.c
> > > @@ -2,6 +2,7 @@
> > > #include <vmlinux.h>
> > > #include <bpf/bpf_tracing.h>
> > > #include <bpf/bpf_helpers.h>
> > > +#include "bpf_testmod/bpf_testmod_kfunc.h"
> >
> > Feel free to ignore if you disagree, but here and elsewhere, should we
> > do this:
> >
> > #include <bpf_testmod/bpf_testmod_kfunc.h>
> >
> > rather than using #include "bpf_testmod/bpf_testmod_kfunc.h". Doesn't
> > matter much, but IMO it's just slightly more readable to use the <> to
> > show that we're relying on -I rather than expecting
> > bpf_testmod/bpf_testmod_kfunc.h to be found at a path relative to the
> > progs. #include "bpf_misc.h" makes more sense because it really is
> > located in the progs/ directory.
>
> We do <> for headers that are expected to be installed in the system
> (even if we cheat with -I sometimes). But in this case it's a local
> header, so using "" makes more sense to me. But shouldn't it be
> "../bpf_testmod/bpf_testmod_kfunc.h"?
I think we have -I<..selftests/bpf> so it works.. but right, we want
to show it's local header, so "../bpf_testmod/bpf_testmod_kfunc.h"
makes sense to me
jirka
next prev parent reply other threads:[~2023-02-09 8:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 16:23 [PATCHv3 bpf-next 0/9] bpf: Move kernel test kfuncs into bpf_testmod Jiri Olsa
2023-02-03 16:23 ` [PATCHv3 bpf-next 1/9] selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h Jiri Olsa
2023-02-07 14:28 ` David Vernet
2023-02-09 0:20 ` Andrii Nakryiko
2023-02-09 8:45 ` Jiri Olsa [this message]
2023-02-03 16:23 ` [PATCHv3 bpf-next 2/9] selftests/bpf: Move test_progs helpers to testing_helpers object Jiri Olsa
2023-02-07 14:38 ` David Vernet
2023-02-08 9:35 ` Jiri Olsa
2023-02-03 16:23 ` [PATCHv3 bpf-next 3/9] selftests/bpf: Use only stdout in un/load_bpf_testmod functions Jiri Olsa
2023-02-07 14:41 ` David Vernet
2023-02-08 9:44 ` Jiri Olsa
2023-02-03 16:23 ` [PATCHv3 bpf-next 4/9] selftests/bpf: Do not unload bpf_testmod in load_bpf_testmod Jiri Olsa
2023-02-03 16:23 ` [PATCHv3 bpf-next 5/9] selftests/bpf: Use un/load_bpf_testmod functions in tests Jiri Olsa
2023-02-07 14:45 ` David Vernet
2023-02-03 16:23 ` [PATCHv3 bpf-next 6/9] selftests/bpf: Load bpf_testmod for verifier test Jiri Olsa
2023-02-07 14:46 ` David Vernet
2023-02-03 16:23 ` [PATCHv3 bpf-next 7/9] selftests/bpf: Allow to use kfunc from testmod.ko in test_verifier Jiri Olsa
2023-02-07 15:34 ` David Vernet
2023-02-08 10:09 ` Jiri Olsa
2023-02-03 16:23 ` [PATCHv3 bpf-next 8/9] selftests/bpf: Remove extern from kfuncs declarations Jiri Olsa
2023-02-07 15:35 ` David Vernet
2023-02-03 16:23 ` [PATCHv3 bpf-next 9/9] bpf: Move kernel test kfuncs to bpf_testmod Jiri Olsa
2023-02-04 9:21 ` [PATCHv3 bpf-next 0/9] bpf: Move kernel test kfuncs into bpf_testmod Alexei Starovoitov
2023-02-05 18:17 ` Jiri Olsa
2023-02-05 18:36 ` Ilya Leoshkevich
2023-02-06 9:15 ` Jiri Olsa
2023-02-09 8:47 ` Jiri Olsa
2023-02-09 9:38 ` Ilya Leoshkevich
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=Y+SypX3Ox1kD0Ew+@krava \
--to=olsajiri@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=asavkov@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=memxor@gmail.com \
--cc=sdf@google.com \
--cc=songliubraving@fb.com \
--cc=void@manifault.com \
--cc=yhs@fb.com \
/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