Re: [PATCH bpf-next v3 3/3] selftests/bpf: Cover enum signedness and legacy name matching

From: Quentin Monnet

Date: Mon Nov 02 2026 - 13:54:49 EST


On 01/11/2026 11:32, Hungyu Lin wrote:
> Exercise unsigned enum values with their high bit set and signed
> controls through libbpf's data dumper. Include ordinary enums stored in
> eight bytes and legacy BTF with kflag clear so normalization does not
> lose existing names or match only the low 32 bits of wider data.
>
> Extend bpftool_map_dump with BTF-backed array maps and check both JSON
> and plain output. Cover narrow unsigned names, signed and unsigned
> numeric fallbacks, legacy enum names, both enumerator orders for
> ambiguous narrow names, and unmatched ENUM64 values.
>
> Build legacy enum records through the public BTF API and load them into
> the kernel before invoking bpftool. Initialize map data at its actual
> width so the tests also work on big-endian hosts.
>
> Suggested-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>

Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>