On 11/24/23 2:26 AM, Hangbin Liu wrote: > As Guillaume pointed, many selftests create namespaces with very common > names (like "client" or "server") or even (partially) run directly in init_net. > This makes these tests prone to failure if another namespace with the same > name already exists. It also makes it impossible to run several instances > of these tests in parallel. > > This patch set conver all the net selftests to run in unique namespace, > so we can update the selftest freamwork to run all tests in it's own namespace > in parallel. After update, we only need to wait for the test which need > longest time. > > ]# per_test_logging=1 time ./run_kselftest.sh -n -c net > TAP version 13 > # selftests: net: reuseport_bpf_numa > not ok 3 selftests: net: reuseport_bpf_numa # exit=1 > # selftests: net: reuseport_bpf_cpu > not ok 2 selftests: net: reuseport_bpf_cpu # exit=1 > # selftests: net: reuseport_dualstack > not ok 4 selftests: net: reuseport_dualstack # exit=1 > # selftests: net: reuseaddr_conflict > ok 5 selftests: net: reuseaddr_conflict > > ... > > # selftests: net: test_vxlan_mdb.sh > ok 90 selftests: net: test_vxlan_mdb.sh > # selftests: net: fib_nexthops.sh > not ok 41 selftests: net: fib_nexthops.sh # exit=1 > # selftests: net: fcnal-test.sh > not ok 36 selftests: net: fcnal-test.sh # exit=1 > > real 55m1.238s > user 12m10.350s > sys 22m17.432s > > I have not looked at the details of each script change, but as long as not test is broken by the change I am fine with the intent. Acked-by: David Ahern <dsahern@xxxxxxxxxx>