Message ID | 20191105212817.11158-1-jakub.kicinski@netronome.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [net-next] selftests: devlink: undo changes at the end of resource_test | expand |
Tue, Nov 05, 2019 at 10:28:17PM CET, jakub.kicinski@netronome.com wrote: >The netdevsim object is reused by all the tests, but the resource >tests puts it into a broken state (failed reload in a different >namespace). Make sure it's fixed up at the end of that test >otherwise subsequent tests fail. > >Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources") >Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com> Date: Tue, 5 Nov 2019 13:28:17 -0800 > The netdevsim object is reused by all the tests, but the resource > tests puts it into a broken state (failed reload in a different > namespace). Make sure it's fixed up at the end of that test > otherwise subsequent tests fail. > > Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources") > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Applied.
diff --git a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh index ee89cd2f5bee..753c5b6abe0a 100755 --- a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh +++ b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh @@ -279,6 +279,12 @@ resource_test() devlink -N testns1 dev reload $DL_HANDLE netns testns2 check_fail $? "Unexpected successful reload from netns \"testns1\" into netns \"testns2\"" + devlink -N testns2 resource set $DL_HANDLE path IPv4/fib size ' -1' + check_err $? "Failed to reset IPv4/fib resource size" + + devlink -N testns2 dev reload $DL_HANDLE netns 1 + check_err $? "Failed to reload devlink back" + ip netns del testns2 ip netns del testns1
The netdevsim object is reused by all the tests, but the resource tests puts it into a broken state (failed reload in a different namespace). Make sure it's fixed up at the end of that test otherwise subsequent tests fail. Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources") Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> --- tools/testing/selftests/drivers/net/netdevsim/devlink.sh | 6 ++++++ 1 file changed, 6 insertions(+)