]> www.infradead.org Git - nvme.git/commit
selftests/bpf: Add start_test helper in bpf_tcp_ca
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 30 May 2024 07:41:09 +0000 (15:41 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 6 Jun 2024 21:04:05 +0000 (23:04 +0200)
commitfee97d0c9a14b5dd5cce0ec1df3a54a6b963f40c
treeac2f0c968d22454b02391c98e46b8f73020c64a0
parent9abdfd8a212332c64f6d0a27fc2ad69e9e0335d1
selftests/bpf: Add start_test helper in bpf_tcp_ca

For moving the "if (sk_stg_map)" block out of do_test(), extract the
code before this block as a new function start_test(). It creates
server-side and client-side sockets and returns them to the caller.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/48f2921ff9be958f5d3d28fe6bb7269a61cafa9f.1717054461.git.tanggeliang@kylinos.cn
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c