aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/tcp_client.py
AgeCommit message (Collapse)AuthorFilesLines
2020-07-29bpf, selftests: use :: 1 for localhost in tcp_server.pyJohn Fastabend1-1/+1
Using localhost requires the host to have a /etc/hosts file with that specific line in it. By default my dev box did not, they used ip6-localhost, so the test was failing. To fix remove the need for any /etc/hosts and use ::1. I could just add the line, but this seems easier. Signed-off-by: John Fastabend <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Song Liu <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/159594714197.21431.10113693935099326445.stgit@john-Precision-5820-Tower
2019-02-04selftests/bpf: use localhost in tcp_{server,client}.pyStanislav Fomichev1-2/+1
Bind and connect to localhost. There is no reason for this test to use non-localhost interface. This lets us run this test in a network namespace. Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
2018-07-25bpf: Add Python 3 support to selftests scripts for bpfJeremy Cline1-6/+6
Adjust tcp_client.py and tcp_server.py to work with Python 3 by using the print function, marking string literals as bytes, and using the newer exception syntax. This should be functionally equivalent and supports Python 3+. Signed-off-by: Jeremy Cline <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
2018-01-25bpf: add selftest for tcpbpfLawrence Brakmo1-0/+51
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]>