selftests: avoid using ifconfig
ifconfig is deprecated and not always present, use ip command instead.
Fixes: e0f3b3e5c7 ("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>
This commit is contained in:
committed by
Jakub Kicinski
parent
a4f0866e3d
commit
7cbd49795d
@@ -55,10 +55,10 @@ test_vlan0_del_crash_01() {
|
||||
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
|
||||
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
|
||||
ip netns exec ${NETNS} ifconfig bond0 up
|
||||
ip netns exec ${NETNS} ip link set dev bond0 up
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
|
||||
ip netns exec ${NETNS} ifconfig bond0 down
|
||||
ip netns exec ${NETNS} ifconfig bond0 up
|
||||
ip netns exec ${NETNS} ip link set dev bond0 down
|
||||
ip netns exec ${NETNS} ip link set dev bond0 up
|
||||
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
|
||||
cleanup
|
||||
}
|
||||
@@ -68,11 +68,11 @@ test_vlan0_del_crash_02() {
|
||||
setup
|
||||
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
|
||||
ip netns exec ${NETNS} ifconfig bond0 up
|
||||
ip netns exec ${NETNS} ip link set dev bond0 up
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
|
||||
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
|
||||
ip netns exec ${NETNS} ifconfig bond0 down
|
||||
ip netns exec ${NETNS} ifconfig bond0 up
|
||||
ip netns exec ${NETNS} ip link set dev bond0 down
|
||||
ip netns exec ${NETNS} ip link set dev bond0 up
|
||||
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
|
||||
cleanup
|
||||
}
|
||||
@@ -84,9 +84,9 @@ test_vlan0_del_crash_03() {
|
||||
ip netns exec ${NETNS} ip link add bond0 type bond mode 0
|
||||
ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
|
||||
ip netns exec ${NETNS} ifconfig bond0 up
|
||||
ip netns exec ${NETNS} ip link set dev bond0 up
|
||||
ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on
|
||||
ip netns exec ${NETNS} ifconfig bond0 down
|
||||
ip netns exec ${NETNS} ip link set dev bond0 down
|
||||
ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function"
|
||||
cleanup
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user