selftests/bpf: Add mprog API tests for BPF tcx opts
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 19 Jul 2023 14:08:57 +0000 (16:08 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Jul 2023 17:07:28 +0000 (10:07 -0700)
commitcd13c91d929053baec94e278b28c7f3b974d02ed
tree297693d5aff5f247d0c43d9daba4fcd22174b9a9
parent57c61da8bff4a5cf5fd15a26517c3960e04d8d61
selftests/bpf: Add mprog API tests for BPF tcx opts

Add a big batch of test coverage to assert all aspects of the tcx opts
attach, detach and query API:

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  #238     tc_opts_after:OK
  #239     tc_opts_append:OK
  #240     tc_opts_basic:OK
  #241     tc_opts_before:OK
  #242     tc_opts_chain_classic:OK
  #243     tc_opts_demixed:OK
  #244     tc_opts_detach:OK
  #245     tc_opts_detach_after:OK
  #246     tc_opts_detach_before:OK
  #247     tc_opts_dev_cleanup:OK
  #248     tc_opts_invalid:OK
  #249     tc_opts_mixed:OK
  #250     tc_opts_prepend:OK
  #251     tc_opts_replace:OK
  #252     tc_opts_revision:OK
  Summary: 15/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20230719140858.13224-8-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/tc_helpers.h [new file with mode: 0644]
tools/testing/selftests/bpf/prog_tests/tc_opts.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_tc_link.c [new file with mode: 0644]