]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdc0998d916c404f621620c4efe3fa5803d203a9b
tree6fc5b73eddb379acff2313d6984eb189cb500f7a
parentdd511c5a022c9346895ae72972d7824bada52a26
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