> selftests/bpf: Add tests to verify global percpu data
>
> If the arch, like s390x, does not support percpu insn, these cases won't
> test global percpu data by checking FEAT_PERCPU_DATA support.
>
> The following APIs have been tested for global percpu data:
>
> 1. bpf_map__set_initial_value()
> 2. bpf_map__initial_value()
> 3. generated percpu struct pointer pointing to internal map's mmaped data
> 4. bpf_map__lookup_elem() for global percpu data map
>
> At the same time, the case is also tested with 'bpftool gen skeleton -L'.
>
> Add a test to verify that the live vars of subskel won't include the vars
> for global percpu data.
>
> Assisted-by: Codex:gpt-5.5-xhigh
> Signed-off-by: Leon Hwang <[email protected]>
This isn't a bug, but item 4 lists bpf_map__lookup_elem(), while the added
test reads the map through the fd-based bpf_map_lookup_elem_flags():
err = bpf_map_lookup_elem_flags(map_fd, &key, &data, flags);
Should the changelog name the API that is actually exercised?
---
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/29428917849