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

Add a big batch of test coverage to assert all aspects of the tcx link API:

  # ./vmtest.sh -- ./test_progs -t tc_links
  [...]
  #225     tc_links_after:OK
  #226     tc_links_append:OK
  #227     tc_links_basic:OK
  #228     tc_links_before:OK
  #229     tc_links_chain_classic:OK
  #230     tc_links_dev_cleanup:OK
  #231     tc_links_invalid:OK
  #232     tc_links_prepend:OK
  #233     tc_links_replace:OK
  #234     tc_links_revision:OK
  Summary: 10/0 PASSED, 0 SKIPPED, 0 FAILED

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