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>
Showing
- tools/lib/bpf/libbpf.c 29 additions, 0 deletionstools/lib/bpf/libbpf.c
- tools/lib/bpf/libbpf.h 2 additions, 0 deletionstools/lib/bpf/libbpf.h
- tools/testing/selftests/bpf/Makefile 1 addition, 1 deletiontools/testing/selftests/bpf/Makefile
- tools/testing/selftests/bpf/sockmap_parse_prog.c 38 additions, 0 deletionstools/testing/selftests/bpf/sockmap_parse_prog.c
- tools/testing/selftests/bpf/sockmap_verdict_prog.c 48 additions, 0 deletionstools/testing/selftests/bpf/sockmap_verdict_prog.c
- tools/testing/selftests/bpf/test_maps.c 308 additions, 0 deletionstools/testing/selftests/bpf/test_maps.c
- tools/testing/selftests/bpf/test_progs.c 17 additions, 38 deletionstools/testing/selftests/bpf/test_progs.c
Please register or sign in to comment