diff options
author | Hangbin Liu <[email protected]> | 2022-01-25 16:17:11 +0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2022-01-27 19:21:27 -0800 |
commit | cec74489a8dee93053340ec88ea938ff4008c3c0 (patch) | |
tree | 7234c63aeda6dcc236b6733863ddc87a027e4847 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | b6ec79518ef0c84d1ed0f76b8af9592a75eb29b6 (diff) |
selftests/bpf/test_xdp_redirect_multi: use temp netns for testing
Use temp netns instead of hard code name for testing in case the netns
already exists.
Remove the hard code interface index when creating the veth interfaces.
Because when the system loads some virtual interface modules, e.g. tunnels.
the ifindex of 2 will be used and the cmd will fail.
As the netns has not created if checking environment failed. Trap the
clean up function after checking env.
Fixes: 8955c1a32987 ("selftests/bpf/xdp_redirect_multi: Limit the tests in netns")
Signed-off-by: Hangbin Liu <[email protected]>
Acked-by: William Tu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions