Re: [PATCH bpf-next 10/10] bpf, selftests: Add various BPF tc link selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 4, 2022 at 4:12 PM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote:
>
> Add a big batch of selftest to extend test_progs with various tc link,
> attach ops and old-style tc BPF attachments via libbpf APIs. Also test
> multi-program attachments including mixing the various attach options:
>
>   # ./test_progs -t tc_link
>   #179     tc_link_base:OK
>   #180     tc_link_detach:OK
>   #181     tc_link_mix:OK
>   #182     tc_link_opts:OK
>   #183     tc_link_run_base:OK
>   #184     tc_link_run_chain:OK
>   Summary: 6/0 PASSED, 0 SKIPPED, 0 FAILED
>
> All new and existing test cases pass.
>
> Co-developed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>
> Signed-off-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>
> Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> ---

Few small things.

First, please make sure to not use CHECK and CHECK_FAIL.

Second, it's kind of sad that we need to still check
ENABLE_ATOMICS_TESTS guards. I'd either not do that at all, or I
wonder if it's cleaner to do it in one header and just re-#define
__sync_fetch_and_xxx to be no-ops. This will make compilation not
break. And then tests will just be failing at runtime, which is fine,
because they can be denylisted. WDYT?

>  .../selftests/bpf/prog_tests/tc_link.c        | 756 ++++++++++++++++++
>  .../selftests/bpf/progs/test_tc_link.c        |  43 +
>  2 files changed, 799 insertions(+)
>  create mode 100644 tools/testing/selftests/bpf/prog_tests/tc_link.c
>  create mode 100644 tools/testing/selftests/bpf/progs/test_tc_link.c
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux