selftests/bpf: Use recv_timeout() instead of retries
authorYucong Sun <sunyucong@gmail.com>
Fri, 8 Oct 2021 20:33:06 +0000 (13:33 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 26 Oct 2021 19:29:33 +0000 (12:29 -0700)
commit67b821502dbd6c9b23715da79cb9b37fa7d969dc
tree6fc5b73eddb379acff2313d6984eb189cb500f7a
parentaf493388950b6ea3a86f860cfaffab137e024fc8
selftests/bpf: Use recv_timeout() instead of retries

We use non-blocking sockets in those tests, retrying for
EAGAIN is ugly because there is no upper bound for the packet
arrival time, at least in theory. After we fix poll() on
sockmap sockets, now we can switch to select()+recv().

Signed-off-by: Yucong Sun <sunyucong@gmail.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211008203306.37525-5-xiyou.wangcong@gmail.com
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c