netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] selftests/net: set link down before enslave
@ 2021-01-20 10:29 Hangbin Liu
  2021-01-20 10:42 ` Ido Schimmel
  0 siblings, 1 reply; 6+ messages in thread
From: Hangbin Liu @ 2021-01-20 10:29 UTC (permalink / raw)
  To: netdev
  Cc: Ido Schimmel, Jiri Pirko, Nikolay Aleksandrov, David S . Miller,
	Hangbin Liu

Set the link down before enslave it to a bond device, to avoid
Error: Device can not be enslaved while up.

Fixes: 6374a5606990 ("selftests: rtnetlink: Test bridge enslavement with different parent IDs")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/net/rtnetlink.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index c9ce3dfa42ee..a26fddc63992 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -1205,6 +1205,8 @@ kci_test_bridge_parent_id()
 	dev20=`ls ${sysfsnet}20/net/`
 
 	ip link add name test-bond0 type bond mode 802.3ad
+	ip link set dev $dev10 down
+	ip link set dev $dev20 down
 	ip link set dev $dev10 master test-bond0
 	ip link set dev $dev20 master test-bond0
 	ip link add name test-br0 type bridge
-- 
2.26.2


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

end of thread, other threads:[~2021-01-21  6:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-20 10:29 [PATCH net] selftests/net: set link down before enslave Hangbin Liu
2021-01-20 10:42 ` Ido Schimmel
2021-01-20 14:38   ` Hangbin Liu
2021-01-20 19:43     ` Ido Schimmel
2021-01-21  1:46       ` Jakub Kicinski
2021-01-21  3:02         ` Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).