Skip to content

Commit 7cbd497

Browse files
edumazetkuba-moo
authored andcommitted
selftests: avoid using ifconfig
ifconfig is deprecated and not always present, use ip command instead. Fixes: e0f3b3e ("selftests: Add test cases for vlan_filter modification during runtime") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Dong Chenchen <dongchenchen2@huawei.com> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/20250730115313.3356036-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a4f0866 commit 7cbd497

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tools/testing/selftests/net/vlan_hw_filter.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ test_vlan0_del_crash_01() {
5555
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
5656
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
5757
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
58-
ip netns exec ${NETNS} ifconfig bond0 up
58+
ip netns exec ${NETNS} ip link set dev bond0 up
5959
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
60-
ip netns exec ${NETNS} ifconfig bond0 down
61-
ip netns exec ${NETNS} ifconfig bond0 up
60+
ip netns exec ${NETNS} ip link set dev bond0 down
61+
ip netns exec ${NETNS} ip link set dev bond0 up
6262
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
6363
cleanup
6464
}
@@ -68,11 +68,11 @@ test_vlan0_del_crash_02() {
6868
setup
6969
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
7070
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
71-
ip netns exec ${NETNS} ifconfig bond0 up
71+
ip netns exec ${NETNS} ip link set dev bond0 up
7272
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
7373
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
74-
ip netns exec ${NETNS} ifconfig bond0 down
75-
ip netns exec ${NETNS} ifconfig bond0 up
74+
ip netns exec ${NETNS} ip link set dev bond0 down
75+
ip netns exec ${NETNS} ip link set dev bond0 up
7676
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
7777
cleanup
7878
}
@@ -84,9 +84,9 @@ test_vlan0_del_crash_03() {
8484
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
8585
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
8686
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
87-
ip netns exec ${NETNS} ifconfig bond0 up
87+
ip netns exec ${NETNS} ip link set dev bond0 up
8888
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
89-
ip netns exec ${NETNS} ifconfig bond0 down
89+
ip netns exec ${NETNS} ip link set dev bond0 down
9090
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
9191
cleanup
9292
}

0 commit comments

Comments
 (0)