]> asedeno.scripts.mit.edu Git - linux.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)
commit47cf52a246e526e2092d60ac01c54af9bd45dcc9
tree9b546d89e5d9a00bcd2a1af045095a541216267f
parent07480cbc05ef1ff7301cb11afb7d894ad3d0916a
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