selftests/bpf: Add test for detachment on empty mprog entry
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Aug 2023 13:11:12 +0000 (15:11 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 4 Aug 2023 16:35:39 +0000 (09:35 -0700)
commit21ce6abe178a15a0354eaaf86bea07e302075a20
tree2ae0b1c9a5ef6baf9d89f2d57c7103bb03a69962
parentd210f9735e13e9b1ef6ffbb636ee051f615bd109
selftests/bpf: Add test for detachment on empty mprog entry

Add a detachment test case with miniq present to assert that with and
without the miniq we get the same error.

  # ./test_progs -t tc_opts
  #244     tc_opts_after:OK
  #245     tc_opts_append:OK
  #246     tc_opts_basic:OK
  #247     tc_opts_before:OK
  #248     tc_opts_chain_classic:OK
  #249     tc_opts_delete_empty:OK
  #250     tc_opts_demixed:OK
  #251     tc_opts_detach:OK
  #252     tc_opts_detach_after:OK
  #253     tc_opts_detach_before:OK
  #254     tc_opts_dev_cleanup:OK
  #255     tc_opts_invalid:OK
  #256     tc_opts_mixed:OK
  #257     tc_opts_prepend:OK
  #258     tc_opts_replace:OK
  #259     tc_opts_revision:OK
  Summary: 16/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20230804131112.11012-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/tc_opts.c