]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: selftest: Use network_helpers in the sock_fields test
authorMartin KaFai Lau <kafai@fb.com>
Fri, 25 Sep 2020 00:04:40 +0000 (17:04 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 25 Sep 2020 20:58:02 +0000 (13:58 -0700)
commit1607035c034c9b841167008b947e498197933ed7
tree4324165f9dca8adaea453e86ce162c8bf0a71050
parent7333fc0592a2f49f60253d179f4526e5c53bd25c
bpf: selftest: Use network_helpers in the sock_fields test

This patch uses start_server() and connect_to_fd() from network_helpers.h
to remove the network testing boiler plate codes.  epoll is no longer
needed also since the timeout has already been taken care of also.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200925000440.3858639-1-kafai@fb.com
tools/testing/selftests/bpf/prog_tests/sock_fields.c