selftests/bpf: Test an incomplete BPF CC
authorJörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Wed, 22 Jun 2022 19:12:26 +0000 (21:12 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 23 Jun 2022 16:49:57 +0000 (09:49 -0700)
commit0735627d78caa56f219dc14608ce0bdbd045e07e
treedb73228f689f24814d6955f295e150e0ce1e2213
parent6e945d57cc9f6e27893d57a419434a2859ba6f3f
selftests/bpf: Test an incomplete BPF CC

Test whether a TCP CC implemented in BPF providing neither cong_avoid()
nor cong_control() is correctly rejected. This check solely depends on
tcp_register_congestion_control() now, which is invoked during
bpf_map__attach_struct_ops().

Signed-off-by: Jörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Link: https://lore.kernel.org/r/20220622191227.898118-5-jthinz@mailbox.tu-berlin.de
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/tcp_ca_incompl_cong_ops.c [new file with mode: 0644]