linux/tools/testing/selftests/drivers/net
Jiri Pirko 52901f5f0b 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>
History 2023-03-10 09:28:25 +01:00
..
bonding selftests: bonding: add bonding prio option test 2022-12-13 19:19:54 -08:00
dsa selftests: net: Fix cross-tree inclusion of scripts 2022-10-20 21:09:22 -07:00
mlxsw selftests: mlxsw: Move IPv6 decap_error test to shared directory 2022-12-08 18:46:32 -08:00
netdevsim sefltests: netdevsim: wait for devlink instance after netns removal 2023-03-10 09:28:25 +01:00
ocelot selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive 2023-02-07 12:20:21 +01:00
team selftests: net: Fix netdev name mismatch in cleanup 2022-10-20 21:09:22 -07:00