aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/drivers/net')
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh23
1 files changed, 3 insertions, 20 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh b/tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
index cc527660a022..9e875ee8dc1c 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
@@ -103,16 +103,6 @@ dscp_map()
done
}
-lldpad_wait()
-{
- local dev=$1; shift
-
- while lldptool -t -i $dev -V APP -c app | grep -q pending; do
- echo "$dev: waiting for lldpad to push pending APP updates"
- sleep 5
- done
-}
-
switch_create()
{
ip link add name br1 type bridge vlan_filtering 1
@@ -124,22 +114,15 @@ switch_create()
lldptool -T -i $swp1 -V APP $(dscp_map 10) >/dev/null
lldptool -T -i $swp2 -V APP $(dscp_map 20) >/dev/null
- lldpad_wait $swp1
- lldpad_wait $swp2
+ lldpad_app_wait_set $swp1
+ lldpad_app_wait_set $swp2
}
switch_destroy()
{
lldptool -T -i $swp2 -V APP -d $(dscp_map 20) >/dev/null
lldptool -T -i $swp1 -V APP -d $(dscp_map 10) >/dev/null
-
- # Give lldpad a chance to push down the changes. If the device is downed
- # too soon, the updates will be left pending, but will have been struck
- # off the lldpad's DB already, and we won't be able to tell. Then on
- # next test iteration this would cause weirdness as newly-added APP
- # rules conflict with the old ones, sometimes getting stuck in an
- # "unknown" state.
- sleep 5
+ lldpad_app_wait_del
ip link set dev $swp2 nomaster
ip link set dev $swp1 nomaster