Skip to content

Commit

Permalink
selftests: devlink: undo changes at the end of resource_test
Browse files Browse the repository at this point in the history
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: b74c37f ("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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Nov 6, 2019
1 parent a9b9728 commit 462ef97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/testing/selftests/drivers/net/netdevsim/devlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 462ef97

Please sign in to comment.