mirror-linux/tools/testing/selftests/drivers/net
Jiri Pirko 92e832252e sefltests: netdevsim: wait for devlink instance after netns removal
[ Upstream commit f922c7b1c1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:08 +01:00
..
bonding selftests: net: Fix cross-tree inclusion of scripts 2022-10-20 21:09:22 -07:00
dsa selftests: net: Fix cross-tree inclusion of scripts 2022-10-20 21:09:22 -07:00
mlxsw selftests: mlxsw: Remove qos_burst test 2022-09-19 18:08:00 -07:00
netdevsim sefltests: netdevsim: wait for devlink instance after netns removal 2023-03-10 09:33:08 +01:00
ocelot selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive 2023-03-03 11:52:22 +01:00
team selftests: net: Fix netdev name mismatch in cleanup 2022-10-20 21:09:22 -07:00