bpf: selftests add sockmap tests
authorJohn Fastabend <john.fastabend@gmail.com>
Wed, 16 Aug 2017 05:34:22 +0000 (22:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2017 18:27:53 +0000 (11:27 -0700)
commit6f6d33f3b3d0f53799d120d28abd13ad90041549
treedbd263882c3bc49c8bc1d7a08b7d0eadd0f4ddb3
parent41bc94f535ef454e325a6d4db085ec345376de6c
bpf: selftests add sockmap tests

This generates a set of sockets, attaches BPF programs, and sends some
simple traffic using basic send/recv pattern. Additionally, we do a bunch
of negative tests to ensure adding/removing socks out of the sockmap fail
correctly.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/sockmap_parse_prog.c [new file with mode: 0644]
tools/testing/selftests/bpf/sockmap_verdict_prog.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_maps.c
tools/testing/selftests/bpf/test_progs.c