bpf: add selftest for tcpbpf
Added a selftest for tcpbpf (sock_ops) that checks that the appropriate callbacks occured and that it can access tcp_sock fields and that their values are correct. Run with command: ./test_tcpbpf_user Adding the flag "-d" will show why it did not pass. Signed-off-by:Lawrence Brakmo <brakmo@fb.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Showing
- tools/include/uapi/linux/bpf.h 82 additions, 4 deletionstools/include/uapi/linux/bpf.h
- tools/testing/selftests/bpf/Makefile 2 additions, 2 deletionstools/testing/selftests/bpf/Makefile
- tools/testing/selftests/bpf/bpf_helpers.h 2 additions, 0 deletionstools/testing/selftests/bpf/bpf_helpers.h
- tools/testing/selftests/bpf/tcp_client.py 51 additions, 0 deletionstools/testing/selftests/bpf/tcp_client.py
- tools/testing/selftests/bpf/tcp_server.py 83 additions, 0 deletionstools/testing/selftests/bpf/tcp_server.py
- tools/testing/selftests/bpf/test_tcpbpf.h 16 additions, 0 deletionstools/testing/selftests/bpf/test_tcpbpf.h
- tools/testing/selftests/bpf/test_tcpbpf_kern.c 118 additions, 0 deletionstools/testing/selftests/bpf/test_tcpbpf_kern.c
- tools/testing/selftests/bpf/test_tcpbpf_user.c 126 additions, 0 deletionstools/testing/selftests/bpf/test_tcpbpf_user.c
Loading
Please register or sign in to comment