• Daniel Borkmann's avatar
    selftest/bpf: Add various selftests for program limits · d1a783da
    Daniel Borkmann authored
    Add various tests to check maximum number of supported programs
    being attached:
    
      # ./vmtest.sh -- ./test_progs -t tc_opts
      [...]
      ./test_progs -t tc_opts
      [    1.185325] bpf_testmod: loading out-of-tree module taints kernel.
      [    1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
      [    1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz
      [    1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns
      [    1.276408] clocksource: Switched to clocksource tsc
      #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              <--- (new test)
      #266     tc_opts_mixed:OK
      #267     tc_opts_prepend:OK
      #268     tc_opts_replace:OK
      #269     tc_opts_revision:OK
      Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20230929204121.20305-2-daniel@iogearbox.net
    d1a783da
tc_opts.c 64.8 KB