[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzbqmrucgeXX9+Hgnhefne-go9nHYPmh_+JwuMHeNNsv-g@mail.gmail.com>
Date: Wed, 24 Apr 2024 17:28:49 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Benjamin Tissoires <bentiss@...nel.org>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...gle.com>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Mykola Lysenko <mykolal@...com>, Shuah Khan <shuah@...nel.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 12/16] selftests/bpf: wq: add bpf_wq_init() checks
On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires <bentiss@...nel.org> wrote:
>
> Allows to test if allocation/free works
>
> Signed-off-by: Benjamin Tissoires <bentiss@...nel.org>
>
> ---
>
> changes in v2:
> - dropped mark_precise checks
> ---
> tools/testing/selftests/bpf/bpf_experimental.h | 1 +
> tools/testing/selftests/bpf/prog_tests/wq.c | 8 +++
> tools/testing/selftests/bpf/progs/wq.c | 10 ++++
> tools/testing/selftests/bpf/progs/wq_failures.c | 78 +++++++++++++++++++++++++
> 4 files changed, 97 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
> index 3329ea080865..785b91b629be 100644
> --- a/tools/testing/selftests/bpf/bpf_experimental.h
> +++ b/tools/testing/selftests/bpf/bpf_experimental.h
> @@ -470,4 +470,5 @@ extern int bpf_iter_css_new(struct bpf_iter_css *it,
> extern struct cgroup_subsys_state *bpf_iter_css_next(struct bpf_iter_css *it) __weak __ksym;
> extern void bpf_iter_css_destroy(struct bpf_iter_css *it) __weak __ksym;
>
> +extern int bpf_wq_init(struct bpf_wq *wq, void *p__map, unsigned int flags) __weak __ksym;
> #endif
> diff --git a/tools/testing/selftests/bpf/prog_tests/wq.c b/tools/testing/selftests/bpf/prog_tests/wq.c
> index 9a07b8bc2c52..26ab69796103 100644
> --- a/tools/testing/selftests/bpf/prog_tests/wq.c
> +++ b/tools/testing/selftests/bpf/prog_tests/wq.c
> @@ -2,6 +2,7 @@
> /* Copyright (c) 2024 Benjamin Tissoires */
> #include <test_progs.h>
> #include "wq.skel.h"
> +#include "wq_failures.skel.h"
>
> void serial_test_wq(void)
> {
> @@ -9,3 +10,10 @@ void serial_test_wq(void)
>
> RUN_TESTS(wq);
> }
> +
> +void serial_test_failures_wq(void)
> +{
> + LIBBPF_OPTS(bpf_test_run_opts, topts);
> +
unused leftover?
> + RUN_TESTS(wq_failures);
> +}
[...]
Powered by blists - more mailing lists