On Mon, May 4, 2020 at 10:37 AM Stanislav Fomichev <[email protected]> wrote:
>
> Move the following routines that let us start a background listener
> thread and connect to a server by fd to the test_prog:
> * start_server_thread - start background INADDR_ANY thread
> * stop_server_thread - stop the thread
> * connect_to_fd - connect to the server identified by fd
>
> These will be used in the next commit.
>
> Also, extend these helpers to support AF_INET6 and accept the family
> as an argument.
>
> Cc: Andrey Ignatov <[email protected]>
> Signed-off-by: Stanislav Fomichev <[email protected]>
> ---
> .../selftests/bpf/prog_tests/tcp_rtt.c | 115 +--------------
> tools/testing/selftests/bpf/test_progs.c | 138 ++++++++++++++++++
> tools/testing/selftests/bpf/test_progs.h | 3 +
> 3 files changed, 144 insertions(+), 112 deletions(-)
Can this functionality be moved into a separate file, similar to
cgroup_helpers.{c.h}? This doesn't seem like helper routines needed
for most tests, so it doesn't make sense to me to keep piling
everything into test_progs.{c,h}.
[...]