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

bot+bpf-ci
2026-04-12T18:28:49Z

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

> 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?

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