Re: [PATCH bpf-next v7 5/9] selftests/bpf: Add basic libarena scaffolding

Emil Tsalapatis
2026-04-12T18:31:56Z

On Sun Apr 12, 2026 at 2:28 PM EDT, bot+bpf-ci wrote:
>> diff --git a/tools/testing/selftests/bpf/libarena/selftests/selftest.c b/tools/testing/selftests/bpf/libarena/selftests/selftest.c
>> new file mode 100644
>> index 000000000000..c692e20ea7b1
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/libarena/selftests/selftest.c
>
> [ ... ]
>
>> +#include "../libarena.skel.h"
>> +typedef struct libarena selftest;
>> +#define selftest__open libarena__open
>> +#define selftest__open_and_load libarena__open_and_load
>> +#define selftest__load libarena__load
>> +#define selftest__attach libarena__attach
>> +#define selftest__destroy libarena__destroy
>
> Alexei raised this in v4 review:
>
> https://lore.kernel.org/bpf/CAADnVQLCyP+NzO9-332JO+dBe=EDEOr+ax+-ZrvAqJ9yTNYyEA@mail.gmail.com/
>
> asking about the purpose of these #defines and calling them
> obfuscation. These aliases don't appear to have been removed or
> discussed in subsequent versions.
>
> Would it be simpler to use the libarena skeleton functions directly
> (libarena__open_and_load, libarena__attach, libarena__destroy, etc.)
> and drop the selftest typedef and alias macros?
>

This is resolved, the renaming is useful for patch 7.

>
> ---
> 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/24313021445