Here is the last part of converting net selftests to run in unique namespace. This part converts all left tests. After the conversion, we can run the net sleftests in parallel. e.g.
# ./run_kselftest.sh -n -t net:reuseport_bpf TAP version 13 1..1 # selftests: net: reuseport_bpf ok 1 selftests: net: reuseport_bpf mod 10... # Socket 0: 0 # Socket 1: 1 ... # Socket 4: 19 # Testing filter add without bind... # SUCCESS
# ./run_kselftest.sh -p -n -t net:cmsg_so_mark.sh -t net:cmsg_time.sh -t net:cmsg_ipv6.sh TAP version 13 1..3 # selftests: net: cmsg_so_mark.sh ok 1 selftests: net: cmsg_so_mark.sh # selftests: net: cmsg_time.sh ok 2 selftests: net: cmsg_time.sh # selftests: net: cmsg_ipv6.sh ok 3 selftests: net: cmsg_ipv6.sh
# ./run_kselftest.sh -p -n -c net TAP version 13 1..95 # selftests: net: reuseport_bpf_numa ok 3 selftests: net: reuseport_bpf_numa # selftests: net: reuseport_bpf_cpu ok 2 selftests: net: reuseport_bpf_cpu # selftests: net: sk_bind_sendto_listen ok 9 selftests: net: sk_bind_sendto_listen # selftests: net: reuseaddr_conflict ok 5 selftests: net: reuseaddr_conflict ...
Here is the part 1 link: https://lore.kernel.org/netdev/20231202020110.362433-1-liuhangbin@gmail.com part 2 link: https://lore.kernel.org/netdev/20231206070801.1691247-1-liuhangbin@gmail.com part 3 link: https://lore.kernel.org/netdev/20231213060856.4030084-1-liuhangbin@gmail.com
Hangbin Liu (8): selftests/net: convert gre_gso.sh to run it in unique namespace selftests/net: convert netns-name.sh to run it in unique namespace selftests/net: convert rtnetlink.sh to run it in unique namespace selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace selftests/net: convert xfrm_policy.sh to run it in unique namespace selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh selftests/net: convert pmtu.sh to run it in unique namespace kselftest/runner.sh: add netns support
tools/testing/selftests/kselftest/runner.sh | 38 ++++- tools/testing/selftests/net/gre_gso.sh | 18 +-- tools/testing/selftests/net/gro.sh | 4 +- tools/testing/selftests/net/netns-name.sh | 44 +++--- tools/testing/selftests/net/pmtu.sh | 27 ++-- tools/testing/selftests/net/rtnetlink.sh | 34 +++-- tools/testing/selftests/net/setup_loopback.sh | 8 +- tools/testing/selftests/net/setup_veth.sh | 9 +- .../selftests/net/stress_reuseport_listen.sh | 6 +- tools/testing/selftests/net/toeplitz.sh | 14 +- tools/testing/selftests/net/xfrm_policy.sh | 138 +++++++++--------- tools/testing/selftests/run_kselftest.sh | 10 +- 12 files changed, 193 insertions(+), 157 deletions(-)