diff options
| author | Leon Hwang <leon.hwang@linux.dev> | 2026-08-26 22:56:13 +0800 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2026-08-27 17:09:46 -0700 |
| commit | 5e875ae9e9ffd5c76c6bdf8982f99de340dd46af (patch) | |
| tree | fc40bba62faf7af1da49e9d69bc6c867ce90f213 /tools/lib | |
| parent | ac3d88577cdaa5330cf32d03ee3808df8fa338ac (diff) | |
| download | linux-next-5e875ae9e9ffd5c76c6bdf8982f99de340dd46af.tar.gz linux-next-5e875ae9e9ffd5c76c6bdf8982f99de340dd46af.zip | |
selftests/bpf: Avoid flaky resize value test for percpu data
The bpf_map__set_value_size() test for percpu data relies on the tail
'cpu_id' field in the ".percpu" map. The test would fail, when 'cpu_id' is
not the last field in the map.
To avoid the flaky test, factor out a subtest to use a dedicated
".percpu.arr" map that only has one field 'int arr[1]'. And, skip the
subtest when fail to load skel with errno E2BIG and the new value size is
larger than ALIGN(32KiB, PAGE_SIZE).
And, drop 'args' in test_percpu_data_on_cpus(), which isn't used in bpf
prog side.
And, enhance the test to cover 'set' and 'nums[6]'.
Fixes: 4c9241bd731a ("selftests/bpf: Add tests to verify global percpu data")
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260826145613.34182-1-leon.hwang@linux.dev
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions
