]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Make tcp_rtt test more robust to failures
authorAndrii Nakryiko <andriin@fb.com>
Wed, 11 Mar 2020 22:27:49 +0000 (15:27 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Mar 2020 19:49:51 +0000 (12:49 -0700)
commit78633b5c38fae3fa601ffa52b290e4e58714f730
tree5759fc33f51ed252abef521733f9e4b67fb2d560
parenta07f448af64586e8438ca86fd5ec662f9357485d
selftests/bpf: Make tcp_rtt test more robust to failures

Switch to non-blocking accept and wait for server thread to exit before
proceeding. I noticed that sometimes tcp_rtt server thread failure would
"spill over" into other tests (that would run after tcp_rtt), probably just
because server thread exits much later and tcp_rtt doesn't wait for it.

v1->v2:
  - add usleep() while waiting on initial non-blocking accept() (Stanislav);

Fixes: 4121c822a947 ("selftests/bpf: test_progs: fix client/server race in tcp_rtt")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20200311222749.458015-1-andriin@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/tcp_rtt.c