]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Tidy xdp attach selftests
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Fri, 2 Jul 2021 11:18:25 +0000 (16:48 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 8 Jul 2021 03:01:45 +0000 (20:01 -0700)
commite065ca3275e276dc0b36cdb4607816285dbe23c6
tree8d3d3a649503e69af099c6d72fee5b28ec3db980
parent6aef73503ef58f64f6f1a29da4d984804cd04f9a
bpf: Tidy xdp attach selftests

Support for cpumap and devmap entry progs in previous commits means the
test needs to be updated for the new semantics. Also take this
opportunity to convert it from CHECK macros to the new ASSERT macros.

Since xdp_cpumap_attach has no subtest, put the sole test inside the
test_xdp_cpumap_attach function.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20210702111825.491065-6-memxor@gmail.com
tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c