All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: devlink: undo changes at the end of resource_test
@ 2019-11-05 21:28 Jakub Kicinski
  2019-11-06  9:04 ` Jiri Pirko
  2019-11-06 19:11 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-11-05 21:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, oss-drivers, jiri, Jakub Kicinski

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(+)

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
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: devlink: undo changes at the end of resource_test
  2019-11-05 21:28 [PATCH net-next] selftests: devlink: undo changes at the end of resource_test Jakub Kicinski
@ 2019-11-06  9:04 ` Jiri Pirko
  2019-11-06 19:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2019-11-06  9:04 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, oss-drivers

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: devlink: undo changes at the end of resource_test
  2019-11-05 21:28 [PATCH net-next] selftests: devlink: undo changes at the end of resource_test Jakub Kicinski
  2019-11-06  9:04 ` Jiri Pirko
@ 2019-11-06 19:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-11-06 19:11 UTC (permalink / raw)
  To: jakub.kicinski; +Cc: netdev, oss-drivers, jiri

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-06 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 21:28 [PATCH net-next] selftests: devlink: undo changes at the end of resource_test Jakub Kicinski
2019-11-06  9:04 ` Jiri Pirko
2019-11-06 19:11 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.