selftests/bpf: Add tests for cgrp_local_storage with local percpu kptr
authorYonghong Song <yonghong.song@linux.dev>
Sun, 27 Aug 2023 15:28:27 +0000 (08:28 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 8 Sep 2023 15:42:18 +0000 (08:42 -0700)
commitdfae1eeee9baa12e27f24a223d699326133e366b
tree8cbfb41c94536af427335ba65d1dfa2770c06c50
parent46200d6da544a624ad4a6f5745defed7e318f73d
selftests/bpf: Add tests for cgrp_local_storage with local percpu kptr

Add a non-sleepable cgrp_local_storage test with percpu kptr. The
test does allocation of percpu data, assigning values to percpu
data and retrieval of percpu data. The de-allocation of percpu
data is done when the map is freed.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230827152827.2001784-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/percpu_alloc.c
tools/testing/selftests/bpf/progs/percpu_alloc_cgrp_local_storage.c [new file with mode: 0644]