selftests/bpf: Add selftests for new cgroup local storage
authorYonghong Song <yhs@fb.com>
Wed, 26 Oct 2022 04:29:11 +0000 (21:29 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 26 Oct 2022 06:19:19 +0000 (23:19 -0700)
commit12bb6ca4e2fa14ecb007228160d1e5f8c5b92d01
tree3be64b8cd71c33a31e0e1a37d6985ecc0847f73a
parentfd4ca6c1facfdc370d5f0b798106d07433e33aec
selftests/bpf: Add selftests for new cgroup local storage

Add four tests for new cgroup local storage, (1) testing bpf program helpers
and user space map APIs, (2) testing recursive fentry triggering won't deadlock,
(3) testing progs attached to cgroups, and (4) a negative test if the
bpf_cgrp_storage_get() helper key is not a cgroup btf id.

Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20221026042911.675546-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/cgrp_ls_attach_cgroup.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/cgrp_ls_negative.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/cgrp_ls_recursion.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/cgrp_ls_tp_btf.c [new file with mode: 0644]