From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: <bot+bpf-ci@kernel.org>, <etsal@meta.com>, <bpf@vger.kernel.org>
Cc: <ast@kernel.org>, <andrii@kernel.org>, <eddyz87@gmail.com>,
<daniel@iogearbox.net>, <memxor@gmail.com>, <puranjay@kernel.org>,
<song@kernel.org>, <martin.lau@kernel.org>,
<yonghong.song@linux.dev>, <clm@meta.com>,
<ihor.solodrai@linux.dev>
Subject: Re: [PATCH 07/13] selftests: bpf: Add ASAN support for libarena selftests
Date: Thu, 22 Jan 2026 22:00:48 -0500 [thread overview]
Message-ID: <DFVMTC754CLG.13D4ZT20QISO2@etsalapatis.com> (raw)
In-Reply-To: <161065237f7ad567f93be5052ac9f15673909e5089388f71fbdf8ddd5dbed49e@mail.kernel.org>
On Thu Jan 22, 2026 at 11:58 AM EST, bot+bpf-ci wrote:
>> diff --git a/tools/testing/selftests/bpf/libarena/selftests/selftest.c b/tools/testing/selftests/bpf/libarena/selftests/selftest.c
>> index 2e4c0830fed9..4d7db66e75ed 100644
>> --- a/tools/testing/selftests/bpf/libarena/selftests/selftest.c
>> +++ b/tools/testing/selftests/bpf/libarena/selftests/selftest.c
>
> [ ... ]
>
>> @@ -211,8 +269,17 @@ static void
>> banner(const char *progpath)
>> {
>> char *name = basename(progpath);
>> + bool is_asan;
>> +
>> + /*
>> + * Check if our BPF programs are ASAN-capable by inspecting the prog name.
>> + * Command line arguments are guaranteed to be NULL-terminated, use strlen.
>> + * Calculate the hardcoded name's length at compile time.
>> + */
>> + printf("%s\n", name);
>> + is_asan = strlen(name) > (sizeof("selftest") - 1);
>
> The ASAN detection logic compares against "selftest" (8 chars), but
> the actual binary names are "test_libarena" (13 chars) and
> "test_libarena_asan" (18 chars). Since strlen("test_libarena") > 8
> evaluates to true, the non-ASAN binary will also be detected as
> ASAN-enabled.
>
> Should the comparison be against "test_libarena" instead of "selftest"?
> Or perhaps using strstr(name, "_asan") would be more robust?
>
Ack, test_libarena was initially called "selftest" and was renamed for uniformity.
strstr() is the better idea, will add in the revision.
>> +
>> - printf("=== %s ===\n", "libarena selftests");
>> + printf("=== %s %s===\n", "libarena selftests", is_asan ? "(asan) " : "");
>> }
>
>
> ---
> 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/21256973563
next prev parent reply other threads:[~2026-01-23 3:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 16:01 [PATCH 00/13] bpf: Add arena ASAN runtime and BPF library Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 01/13] bpf: Add bpf_stream_print_stack stack dumping kfunc Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 02/13] bpf: Allow BPF stream kfuncs while holding a lock Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 03/13] selftests: bpf: Move bpf_arena_spin_lock.h to the top level Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 04/13] selftests: bpf: Make WRITE_ONCE macro in bpf_atomic.h conditional Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 05/13] selftests: bpf: Add basic libarena scaffolding Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 06/13] selftests: bpf: Add arena ASAN runtime to libarena Emil Tsalapatis
2026-01-22 16:58 ` bot+bpf-ci
2026-01-23 2:56 ` Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 07/13] selftests: bpf: Add ASAN support for libarena selftests Emil Tsalapatis
2026-01-22 16:58 ` bot+bpf-ci
2026-01-23 3:00 ` Emil Tsalapatis [this message]
2026-01-22 16:01 ` [PATCH 08/13] selftest: bpf: Add bump allocator for libarena Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 09/13] selftests: bpf: Add libarena selftests for the bump allocator Emil Tsalapatis
2026-01-22 16:58 ` bot+bpf-ci
2026-01-23 2:55 ` Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 10/13] selftest: bpf: Add libarena stack allocator Emil Tsalapatis
2026-01-22 17:12 ` bot+bpf-ci
2026-01-23 2:59 ` Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 11/13] selftests: bpf: Add selftests for the " Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 12/13] selftests: bpf: Add buddy allocator for libarena Emil Tsalapatis
2026-01-22 16:01 ` [PATCH 13/13] selftests: bpf: Add selftests for the libarena buddy allocator Emil Tsalapatis
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=DFVMTC754CLG.13D4ZT20QISO2@etsalapatis.com \
--to=emil@etsalapatis.com \
--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=eddyz87@gmail.com \
--cc=etsal@meta.com \
--cc=ihor.solodrai@linux.dev \
--cc=martin.lau@kernel.org \
--cc=memxor@gmail.com \
--cc=puranjay@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox