]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Add additional mprog query test coverage
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Oct 2023 08:17:28 +0000 (10:17 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 17 Oct 2023 19:57:43 +0000 (12:57 -0700)
commit24516309e330cd592c04d0467313d885584af4e8
tree5d37875e4ec423afdc1a97121c1576790c5351a3
parent44cb03f19b38c11cfc5bf76ea6d6885da210ded2
selftests/bpf: Add additional mprog query test coverage

Add several new test cases which assert corner cases on the mprog query
mechanism, for example, around passing in a too small or a larger array
than the current count.

  ./test_progs -t tc_opts
  #252     tc_opts_after:OK
  #253     tc_opts_append:OK
  #254     tc_opts_basic:OK
  #255     tc_opts_before:OK
  #256     tc_opts_chain_classic:OK
  #257     tc_opts_chain_mixed:OK
  #258     tc_opts_delete_empty:OK
  #259     tc_opts_demixed:OK
  #260     tc_opts_detach:OK
  #261     tc_opts_detach_after:OK
  #262     tc_opts_detach_before:OK
  #263     tc_opts_dev_cleanup:OK
  #264     tc_opts_invalid:OK
  #265     tc_opts_max:OK
  #266     tc_opts_mixed:OK
  #267     tc_opts_prepend:OK
  #268     tc_opts_query:OK
  #269     tc_opts_query_attach:OK
  #270     tc_opts_replace:OK
  #271     tc_opts_revision:OK
  Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20231017081728.24769-1-daniel@iogearbox.net
tools/testing/selftests/bpf/prog_tests/tc_opts.c