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)
commitc40a565a04afd0429ecc8a1a2c9aff897796118f
tree4324165f9dca8adaea453e86ce162c8bf0a71050
parentb18c1f0aa4775bf1ecfbe5942e4e7c6bffdeff6a
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