From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2] selftests/bpf: Report the real error from libarena parallel workers
Date: Thu, 23 Jul 2026 14:39:54 +0800 [thread overview]
Message-ID: <b8a9b824-8d29-44cf-95f5-41c81cb69be4@linux.dev> (raw)
In-Reply-To: <20260723062443.D491B1F000E9@smtp.kernel.org>
On 7/23/26 2:24 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Skipping `-EINTR` completely causes interrupted tests to falsely pass.
> --
>
> --- Patch [1]: [PATCH bpf-next v2] selftests/bpf: Report the real error from libarena parallel workers ---
> commit a35a4526e56449664def8e15919986cc43126b84
> Author: Jiayuan Chen <jiayuan.chen@linux.dev>
>
> selftests/bpf: Report the real error from libarena parallel workers
>
> This commit updates the error collection logic in the libarena parallel
> tests to skip -EINTR. The goal is to ensure the real failure is reported
> rather than losing it when another worker thread bails out early.
>
> Link: https://github.com/kernel-patches/bpf/actions/runs/29867905253/job/88764463566
> Link: https://github.com/kernel-patches/bpf/actions/runs/29878191901/job/88794845824
>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/libarena.c b/tools/testing/selftests/bpf/prog_tests/libarena.c
>> index df7e4b8dc3945..daade4150af66 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/libarena.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/libarena.c
> [ ... ]
>
>> @@ -118,7 +119,22 @@ static int run_libarena_parallel_test_workers(struct libarena *skel,
>> continue;
>> }
>>
>> - err = err ?: (long)thread_ret;
>> + worker_err = (long)thread_ret;
>> +
>> + /*
>> + * A worker that bails out because another one already gave up
>> + * reports -EINTR. It is collateral damage that carries no
>> + * information, so skip it entirely: never let it become the
>> + * reported error, and don't log it either.
>> + */
>> + if (!worker_err || worker_err == -EINTR)
>> + continue;
>> +
>> + if (!err)
>> + err = worker_err;
> [Severity: Medium]
> If all worker threads return -EINTR due to a process-wide signal, such as a
> global CI timeout or user SIGINT, does this loop leave err initialized to 0
> and falsely report the test as passed?
The bpf_prog_test_run_syscall() path has no way to return -EINTR; a
worker returns -EINTR only
when test_abort is true, and test_abort is never set without another
worker returning the
real error, so the workers can never all return -EINTR.
And even if some future signal-based exit were added to the syscall
path, by then correctness
is already moot....
prev parent reply other threads:[~2026-07-23 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 6:13 [PATCH bpf-next v2] selftests/bpf: Report the real error from libarena parallel workers Jiayuan Chen
2026-07-23 6:24 ` sashiko-bot
2026-07-23 6:39 ` Jiayuan Chen [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=b8a9b824-8d29-44cf-95f5-41c81cb69be4@linux.dev \
--to=jiayuan.chen@linux.dev \
--cc=bpf@vger.kernel.org \
--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 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.