From: Mahe Tardy <mahe.tardy@gmail.com>
To: bot+bpf-ci@kernel.org
Cc: bpf@vger.kernel.org, andrew+netdev@lunn.ch, andrii@kernel.org,
ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
eddyz87@gmail.com, edumazet@google.com, john.fastabend@gmail.com,
kuba@kernel.org, liamwisehart@meta.com, martin.lau@linux.dev,
pabeni@redhat.com, song@kernel.org, netdev@vger.kernel.org,
sdf.kernel@gmail.com, ameryhung@gmail.com, kuniyu@google.com,
memxor@gmail.com, jiayuan.chen@linux.dev, sdf@fomichev.me,
martin.lau@kernel.org, yonghong.song@linux.dev, clm@meta.com,
ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v6 5/5] selftests/bpf: Add ksock test for async callback guard
Date: Thu, 13 Aug 2026 12:13:20 +0200 [thread overview]
Message-ID: <an2YwKV8qx1wXkcA@gmail.com> (raw)
In-Reply-To: <427cd292151a90f499819620700c9c582f1b63348d91d8727eee4200c268200e@mail.kernel.org>
On Wed, Aug 12, 2026 at 05:25:40PM +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/tools/testing/selftests/bpf/prog_tests/ksock_wq.c b/tools/testing/selftests/bpf/prog_tests/ksock_wq.c
> > new file mode 100644
> > index 0000000000000..5b9c6cc303922
> > --- /dev/null
> > +++ b/tools/testing/selftests/bpf/prog_tests/ksock_wq.c
> > @@ -0,0 +1,34 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright (c) 2026 Isovalent */
> > +
> > +#include <unistd.h>
> > +
> > +#include "test_progs.h"
> > +#include "ksock_wq.skel.h"
> > +
> > +void test_ksock_wq(void)
> > +{
> > + LIBBPF_OPTS(bpf_test_run_opts, opts);
> > + struct ksock_wq *skel;
> > + int err;
> > +
> > + skel = ksock_wq__open_and_load();
> > + if (!ASSERT_OK_PTR(skel, "ksock_wq open and load"))
> > + return;
> > +
> > + err = bpf_prog_test_run_opts(
> > + bpf_program__fd(skel->progs.ksock_wq_start), &opts);
> > + if (!ASSERT_OK(err, "run ksock_wq_start"))
> > + goto out;
> > + if (!ASSERT_OK(opts.retval, "ksock_wq_start retval"))
> > + goto out;
> > +
> > + while (!__atomic_load_n(&skel->bss->callback_done, __ATOMIC_ACQUIRE))
> > + usleep(1000);
>
> What happens if the workqueue callback never runs or blocks? This loop is
> unbounded, so the test would hang forever rather than failing. test_progs
> has no per-test timeout, so a hang here would block the entire test run.
>
> Adding an iteration cap (e.g. a bounded retry count followed by an ASSERT
> on callback_done) would turn a CI hang into a normal test failure. For
> comparison, prog_tests/wq.c uses a bounded usleep(50) before asserting.
Unsure how likely it is but it could be indeed improved in this way.
>
> > +
> > + ASSERT_EQ(skel->bss->create_err, -EOPNOTSUPP,
> > + "workqueue create rejected");
> > +
> > +out:
> > + ksock_wq__destroy(skel);
> > +}
>
> [ ... ]
>
>
> ---
> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>
> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/31618864886
prev parent reply other threads:[~2026-08-13 10:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 15:43 [PATCH bpf-next v6 0/5] Introduce bpf_ksock Mahe Tardy
2026-08-12 15:43 ` [PATCH bpf-next v6 1/5] net: Add connect_socket() helper Mahe Tardy
2026-08-12 17:25 ` bot+bpf-ci
2026-08-13 10:11 ` Mahe Tardy
2026-08-12 15:43 ` [PATCH bpf-next v6 2/5] bpf: Add ksock kfuncs Mahe Tardy
2026-08-12 16:19 ` Song Liu
2026-08-12 17:39 ` bot+bpf-ci
2026-08-13 10:59 ` Mahe Tardy
2026-08-12 15:43 ` [PATCH bpf-next v6 3/5] selftests/bpf: Add ksock kfunc test Mahe Tardy
2026-08-12 17:25 ` bot+bpf-ci
2026-08-13 10:58 ` Mahe Tardy
2026-08-12 15:43 ` [PATCH bpf-next v6 4/5] selftests/bpf: Test forbidden bpf_ksock_send() LSM attach Mahe Tardy
2026-08-12 16:18 ` Song Liu
2026-08-12 15:43 ` [PATCH bpf-next v6 5/5] selftests/bpf: Add ksock test for async callback guard Mahe Tardy
2026-08-12 16:25 ` Song Liu
2026-08-12 17:25 ` bot+bpf-ci
2026-08-13 10:13 ` Mahe Tardy [this message]
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=an2YwKV8qx1wXkcA@gmail.com \
--to=mahe.tardy@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=ihor.solodrai@linux.dev \
--cc=jiayuan.chen@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=liamwisehart@meta.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf.kernel@gmail.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.