This set is separated out from the bpf tcp header option series [1] since I think it is in general useful for other network related tests. e.g. enforce socket-fd related timeout and restore netns after each test. [1]: https://lore.kernel.org/netdev/20200626175501.1459961-1-kafai@xxxxxx/ Martin KaFai Lau (2): bpf: selftests: A few improvements to network_helpers.c bpf: selftests: Restore netns after each test tools/testing/selftests/bpf/network_helpers.c | 157 +++++++++++------- tools/testing/selftests/bpf/network_helpers.h | 9 +- .../bpf/prog_tests/cgroup_skb_sk_lookup.c | 12 +- .../bpf/prog_tests/connect_force_port.c | 10 +- .../bpf/prog_tests/load_bytes_relative.c | 4 +- .../selftests/bpf/prog_tests/tcp_rtt.c | 4 +- tools/testing/selftests/bpf/test_progs.c | 23 ++- tools/testing/selftests/bpf/test_progs.h | 2 + 8 files changed, 133 insertions(+), 88 deletions(-) -- 2.24.1