]> 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)
commitcf2fc6f8e9a55e0dc3d02c341a3fdbbaffd0e3ef
tree6fc5b73eddb379acff2313d6984eb189cb500f7a
parent80eb270760d4842da7df68542fb9999353ffd492
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