Re: [PATCH bpf-next v10 6/9] selftests/bpf: Add tests to verify global percpu data

From: Leon Hwang

Date: Thu Jul 16 2026 - 01:30:47 EST


On 16/7/26 00:11, bot+bpf-ci@xxxxxxxxxx wrote:
>> 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 <leon.hwang@xxxxxxxxx>
>
> 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?


Good catch.

Actually, there's no bpf_map__lookup_elem() callsite in this test.

Will update the test to exercise both bpf_map__lookup_elem() and
bpf_map_lookup_elem_flags(). And update the commit message meanwhile.

Thanks,
Leon

> [...]