Re: [PATCH bpf-next v2] selftests/bpf: Use unsigned loop counter in test_buddy_alloc_free
From: bot+bpf-ci
Date: Mon Nov 30 2026 - 23:11:58 EST
> selftests/bpf: Use unsigned loop counter in test_buddy_alloc_free
TL;DR: Possible justification problem: the unsigned counter may not make
libarena build with clang 19, since the arena_spin_lock_slowpath() 32-bit
cmpxchg appears to still fail; Alexei's v2 concern looks unaddressed.
> diff --git a/tools/testing/selftests/bpf/libarena/selftests/test_buddy.bpf.c b/tools/testing/selftests/bpf/libarena/selftests/test_buddy.bpf.c
> --- a/tools/testing/selftests/bpf/libarena/selftests/test_buddy.bpf.c
> +++ b/tools/testing/selftests/bpf/libarena/selftests/test_buddy.bpf.c
> @@ -99,7 +99,8 @@ __weak int test_buddy_alloc_free(void)
> {
> const int iters = 800;
> void __arena *mem;
> - int ret, i;
> + int ret;
> + u32 i;
>
> ret = buddy_init(&buddy);
> if (ret)
Alexei Starovoitov raised a concern about the justification for this change
in v2:
> By that report the build with clang 19 fails with and without this patch.
> The answer is the same as in June. Pls upgrade clang.
Does this change actually make libarena build with clang 19?
arena_spin_lock_slowpath() still has a 32-bit cmpxchg that fails with
"Cannot select: AtomicCmpSwap", and libarena/Makefile passes no -mcpu, so
the build appears to fail with and without this patch.
Has this concern been addressed?
---
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/46572595446