]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add selftest for tcpbpf
authorLawrence Brakmo <brakmo@fb.com>
Fri, 26 Jan 2018 00:14:16 +0000 (16:14 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 26 Jan 2018 00:41:15 +0000 (16:41 -0800)
commit2d21e76e500d2d9c80d14d7fafc472fbadd72d54
treea740942fab1902605fe48ed877d942c6ad02ad58
parentba034f85da259fc3b29d16eb47e8aa1cf69544a5
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>
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]