From: sashiko-bot@kernel.org
To: "Chen Pei" <cp0613@linux.alibaba.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 3/3] selftests/bpf: Add a runtime test for private stack and stack arguments
Date: Thu, 15 Oct 2026 02:23:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-172145@kernel.org> (raw)
In-Reply-To: <20261015021238.5657-4-cp0613@linux.alibaba.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] bpf: test flakiness due to parallel struct_ops attachment
--
commit 30217e3723f8427977b857ce4b668a913d8e6da3
Author: Chen Pei <cp0613@linux.alibaba.com>
selftests/bpf: Add a runtime test for private stack and stack arguments
This commit adds a runtime test for combining private stacks with outgoing
stack arguments. It validates the structural layout via disassembly patterns
and checks runtime execution context across CPUs. It also includes a
struct_ops test to act as a kernel stack control case.
> diff --git a/tools/testing/selftests/bpf/prog_tests/private_stack_runtime.c b/tools/testing/selftests/bpf/prog_tests/private_stack_runtime.c
> new file mode 100644
> index 0000000000000..3af24ca8009f4
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/private_stack_runtime.c
> @@ -0,0 +1,83 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <test_progs.h>
> +#include <network_helpers.h>
> +#include "private_stack_runtime.h"
> +#include "private_stack_runtime.skel.h"
> +
> +void test_private_stack_runtime(void)
> +{
[Severity: Medium]
Will this cause test flakiness in CI due to parallel execution?
The test function lacks the serial_ prefix, so it will run concurrently in
the test_progs worker threads rather than in isolation.
[ ... ]
> + ASSERT_GT(tested, 0, "tested_cpus");
> +
> + ops = bpf_map__attach_struct_ops(skel->maps.zero_stack_ops);
> + if (!ASSERT_OK_PTR(ops, "attach_zero_stack"))
> + goto out;
[Severity: Medium]
Since zero_stack_ops targets the singleton bpf_testmod_ops3 in bpf_testmod,
executing this concurrently with other non-serial tests that attach to the
same struct_ops (such as test_struct_ops_private_stack) can cause random
-EEXIST failures.
st_ops3_reg() in bpf_testmod.c enforces a single active attachment:
if (st_ops3)
... err = -EEXIST
Could this function be renamed to serial_test_private_stack_runtime to avoid
resource conflicts with other tests?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261015021238.5657-1-cp0613@linux.alibaba.com?part=3
next prev parent reply other threads:[~2026-10-15 2:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 2:12 [PATCH bpf-next 0/3] riscv: bpf: Add BPF private stack support Chen Pei
2026-10-15 2:12 ` [PATCH bpf-next 1/3] " Chen Pei
2026-10-15 2:58 ` bot+bpf-ci
2026-10-15 2:12 ` [PATCH bpf-next 2/3] selftests/bpf: Enable private stack tests for riscv64 Chen Pei
2026-10-15 2:22 ` sashiko-bot
2026-10-15 8:00 ` Chen Pei
2026-10-15 2:12 ` [PATCH bpf-next 3/3] selftests/bpf: Add a runtime test for private stack and stack arguments Chen Pei
2026-10-15 2:23 ` sashiko-bot [this message]
2026-10-15 2:59 ` bot+bpf-ci
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=sashiko-outbox-172145@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cp0613@linux.alibaba.com \
--cc=sashiko-reviews@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox