bpf: add selftest for tcpbpf
authorLawrence Brakmo <[email protected]>
Fri, 26 Jan 2018 00:14:16 +0000 (16:14 -0800)
committerAlexei Starovoitov <[email protected]>
Fri, 26 Jan 2018 00:41:15 +0000 (16:41 -0800)
commitd6d4f60c3a0933852dcc40a2142d93027ea1da76
treea740942fab1902605fe48ed877d942c6ad02ad58
parentd44874910a26f3a8f81edf873a2473363f07f660
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 <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/tcp_client.py [new file with mode: 0755]
tools/testing/selftests/bpf/tcp_server.py [new file with mode: 0755]
tools/testing/selftests/bpf/test_tcpbpf.h [new file with mode: 0644]
tools/testing/selftests/bpf/test_tcpbpf_kern.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_tcpbpf_user.c [new file with mode: 0644]