Skip to content

Commit 61fa249

Browse files
liuhangbindavem330
authored andcommitted
selftests: bonding: do not set port down when adding to bond
Similar to commit be80942 ("selftests: bonding: do not set port down before adding to bond"). The bond-arp-interval-causes-panic test failed after commit a4abfa6 ("net: rtnetlink: Enslave device before bringing it up") as the kernel will set the port down _after_ adding to bond if setting port down specifically. Fix it by removing the link down operation when adding to bond. Fixes: 2ffd573 ("selftests: bonding: cause oops in bond_rr_gen_slave_id") Signed-off-by: Hangbin Liu <[email protected]> Tested-by: Benjamin Poirier <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c46bfba commit 61fa249

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ ip netns exec server ip addr add ${server_ip4}/24 dev eth0
3030

3131
ip netns exec client ip link add dev bond0 down type bond mode 1 \
3232
miimon 100 all_slaves_active 1
33-
ip netns exec client ip link set dev eth0 down master bond0
33+
ip netns exec client ip link set dev eth0 master bond0
3434
ip netns exec client ip link set dev bond0 up
3535
ip netns exec client ip addr add ${client_ip4}/24 dev bond0
3636
ip netns exec client ping -c 5 $server_ip4 >/dev/null
3737

38-
ip netns exec client ip link set dev eth0 down nomaster
38+
ip netns exec client ip link set dev eth0 nomaster
3939
ip netns exec client ip link set dev bond0 down
4040
ip netns exec client ip link set dev bond0 type bond mode 0 \
4141
arp_interval 1000 arp_ip_target "+${server_ip4}"
42-
ip netns exec client ip link set dev eth0 down master bond0
42+
ip netns exec client ip link set dev eth0 master bond0
4343
ip netns exec client ip link set dev bond0 up
4444
ip netns exec client ping -c 5 $server_ip4 >/dev/null
4545

0 commit comments

Comments
 (0)