selftests/bpf: Test FD-based cgroup attachment
authorAndrii Nakryiko <andriin@fb.com>
Mon, 30 Mar 2020 03:00:01 +0000 (20:00 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 31 Mar 2020 00:36:41 +0000 (17:36 -0700)
commit7cccee42bf76efc9de69fa2e5b8dbe58bfc8ecdf
tree1d894047fd961e9736b3a45e3bca2da53ac7a5b5
parentcc4f864bb118e0ae7bf9f4e3418eaeb083aa34f2
selftests/bpf: Test FD-based cgroup attachment

Add selftests to exercise FD-based cgroup BPF program attachments and their
intermixing with legacy cgroup BPF attachments. Auto-detachment and program
replacement (both unconditional and cmpxchng-like) are tested as well.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200330030001.2312810-5-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/cgroup_link.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_cgroup_link.c [new file with mode: 0644]