[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220526051227.bqoejq7kyymfxba4@apollo.legion>
Date: Thu, 26 May 2022 10:45:35 +0530
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: Benjamin Poirier <benjamin.poirier@...il.com>
Cc: bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
Maxim Mikityanskiy <maximmi@...dia.com>,
Pablo Neira Ayuso <pablo@...filter.org>,
Florian Westphal <fw@...len.de>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests
On Thu, May 26, 2022 at 06:52:59AM IST, Benjamin Poirier wrote:
> On 2022-01-14 22:09 +0530, Kumar Kartikeya Dwivedi wrote:
> > Use the prog_test kfuncs to test the referenced PTR_TO_BTF_ID kfunc
> > support, and PTR_TO_CTX, PTR_TO_MEM argument passing support. Also
> > testing the various failure cases for invalid kfunc prototypes.
> >
> > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
> > ---
> > net/bpf/test_run.c | 129 +++++++++++++++++-
> > .../selftests/bpf/prog_tests/kfunc_call.c | 6 +
> > .../selftests/bpf/progs/kfunc_call_test.c | 52 ++++++-
> > tools/testing/selftests/bpf/verifier/calls.c | 75 ++++++++++
> > 4 files changed, 258 insertions(+), 4 deletions(-)
> >
>
> It looks like this patch broke building the bpf tests:
>
> tools/testing/selftests/bpf$ make
> CLNG-BPF [test_maps] kfunc_call_test.o
> progs/kfunc_call_test.c:13:46: error: declaration of 'struct prog_test_pass1' will not be visible outside of this function [-Werror,-Wvisibility]
> extern void bpf_kfunc_call_test_pass1(struct prog_test_pass1 *p) __ksym;
> ^
>
> The only definition of struct prog_test_pass1 that I see is in
> net/bpf/test_run.c. How is this supposed to work?
>
>
> commit 87091063df5d ("selftests/bpf: Add test for unstable CT lookup
> API") from the same series added a similar problem in
> progs/test_bpf_nf.c:
>
> progs/test_bpf_nf.c:31:21: error: variable has incomplete type 'struct bpf_ct_opts'
> struct bpf_ct_opts opts_def = { .l4proto = IPPROTO_TCP, .netns_id = -1 };
>
Both of them should have their definition in vmlinux.h. Can you check? Also for
BPF selftests we require conntrack to be built into the kernel, instead of as a
module.
--
Kartikeya
Powered by blists - more mailing lists