]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: test offloads even with BPF programs present
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 14 Jun 2018 18:06:56 +0000 (11:06 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Jun 2018 01:13:17 +0000 (03:13 +0200)
commitc1953f85af7ca02fd753c774bed7f30ee94b53cf
tree9b546d89e5d9a00bcd2a1af045095a541216267f
parent0b64d40c7160d50d90d5ba32a90debb2e6fb737a
selftests/bpf: test offloads even with BPF programs present

Modern distroes increasingly make use of BPF programs.  Default
Ubuntu 18.04 installation boots with a number of cgroup_skb
programs loaded.

test_offloads.py tries to check if programs and maps are not
leaked on error paths by confirming the list of programs on the
system is empty between tests.

Since we can no longer expect the system to have no BPF objects
at boot try to remember the programs and maps present at the start,
and skip those when scanning the system.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_offload.py