selftests/bpf: Add C tests for reference tracking
authorJoe Stringer <joe@wand.net.nz>
Tue, 2 Oct 2018 20:35:40 +0000 (13:35 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 3 Oct 2018 00:53:48 +0000 (02:53 +0200)
commitde375f4e91e3074a09ad337ac4b32a2f21c24d96
treeb1d64d98319f474b264d38a1d3b71c6c4726a73c
parent29cd77f41620dca22bdee092217c16b49ece8915
selftests/bpf: Add C tests for reference tracking

Add some tests that demonstrate and test the balanced lookup/free
nature of socket lookup. Section names that start with "fail" represent
programs that are expected to fail verification; all others should
succeed.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_sk_lookup_kern.c [new file with mode: 0644]