mirror_ubuntu-kernels/tools/testing/selftests/drivers/net/netdevsim
Jiri Pirko f922c7b1c1 sefltests: netdevsim: wait for devlink instance after netns removal
When devlink instance is put into network namespace and that network
namespace gets deleted, devlink instance is moved back into init_ns.
This is done as a part of cleanup_net() routine. Since cleanup_net()
is called asynchronously from workqueue, there is no guarantee that
the devlink instance move is done after "ip netns del" returns.

So fix this race by making sure that the devlink instance is present
before any other operation.

Reported-by: Amir Tzin <amirtz@nvidia.com>
Fixes: b74c37fd35 ("selftests: netdevsim: add tests for devlink reload with resources")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20230220132336.198597-1-jiri@resnulli.us
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-02-21 13:02:42 +01:00
..
devlink_in_netns.sh selftests: test creating netdevsim inside network namespace 2019-10-05 16:34:15 -07:00
devlink_trap.sh selftests: devlink: add a warning for interfaces coming up 2022-12-16 10:21:37 +00:00
devlink.sh sefltests: netdevsim: wait for devlink instance after netns removal 2023-02-21 13:02:42 +01:00
ethtool-coalesce.sh selftests: add ring and coalesce selftests 2020-11-20 12:51:54 -08:00
ethtool-common.sh selftests: net: test ethtool -L vs mq 2021-09-15 15:46:02 +01:00
ethtool-fec.sh selftests: ethtool: add a netdevsim FEC test 2021-03-31 14:15:23 -07:00
ethtool-pause.sh selftests: extract common functions in ethtool-common.sh 2020-11-20 12:51:54 -08:00
ethtool-ring.sh selftests: add ring and coalesce selftests 2020-11-20 12:51:54 -08:00
fib_notifications.sh selftests: netdevsim: Test route offload failure notifications 2021-02-08 16:47:03 -08:00
fib.sh selftests: netdevsim: Add test cases for route deletion failure 2022-07-29 12:21:02 +01:00
hw_stats_l3.sh selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test 2022-05-18 14:06:50 +01:00
nexthop.sh selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV 2021-06-08 14:39:07 -07:00
psample.sh selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV 2021-06-08 14:39:07 -07:00
tc-mq-visibility.sh selftests: net: test ethtool -L vs mq 2021-09-15 15:46:02 +01:00
udp_tunnel_nic.sh selftests: net: add a test for static UDP tunnel ports 2020-09-28 12:50:12 -07:00