linux/tools/testing
Donggeun Yoo 3422808f4e
selftests/bpf: Test per-cpu initialization of a BPF_F_CPU created element
The existing cpu_flag subtests always prime a key with BPF_F_ALL_CPUS
before any BPF_F_CPU write, so the create path is never covered.

Add a subtest that creates the element with BPF_F_CPU on a map with
max_entries 1, so the key can only reuse the element the previous key
released, and check that the CPUs the update did not name read back
zero.  Run it for PERCPU_HASH preallocated and BPF_F_NO_PREALLOC,
whose per-cpu areas come from different allocators, and for
LRU_PERCPU_HASH.

Under BPF_F_NO_PREALLOC the reuse is only guaranteed on the cpu that
ran the delete, so pin the thread across the pair, and name a cpu other
than that one in map_flags.

Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20260924102321.2120434-3-donggeunyoo.kernel@gmail.com
2026-09-24 14:24:52 +00:00
..
crypto/chacha20-s390
cxl Merge branch 'for-7.3/cxl-misc' into cxl-for-next 2026-08-05 13:23:52 -07:00
fault-injection
ktest
kunit spi: Updates for v7.3 2026-08-19 09:47:41 -07:00
memblock kho: make boot time huge page allocation work nicely with KHO 2026-08-23 09:17:38 -07:00
nvdimm nvdimm: ndtest: remove redundant NULL check before vfree() 2026-07-14 16:12:53 -07:00
radix-tree maple_tree: change two GFP flags in tests 2026-08-24 18:43:31 -07:00
rbtree
scatterlist
selftests selftests/bpf: Test per-cpu initialization of a BPF_F_CPU created element 2026-09-24 14:24:52 +00:00
shared mm/slab: improve kmem_cache_alloc_bulk 2026-06-03 18:20:43 +02:00
vma mm: fix CONFIG_STACK_GROWSUP typo in tools/testing/vma/include/dup.h 2026-08-24 18:43:12 -07:00
vsock vsock/test: add test for small packets under pressure 2026-07-21 12:11:06 +02:00