Commit 05ef614c authored by Danielle Ratson's avatar Danielle Ratson Committed by David S. Miller

selftests: mlxsw: Use busywait helper in vxlan test

Vxlan test uses offload indication checks.

Use a busywait helper and wait until the offload indication is set or
fail if it reaches timeout.
Signed-off-by: default avatarDanielle Ratson <danieller@mellanox.com>
Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c22f993
...@@ -248,6 +248,28 @@ busywait() ...@@ -248,6 +248,28 @@ busywait()
done done
} }
not()
{
"$@"
[[ $? != 0 ]]
}
grep_bridge_fdb()
{
local addr=$1; shift
local word
local flag
if [ "$1" == "self" ] || [ "$1" == "master" ]; then
word=$1; shift
if [ "$1" == "-v" ]; then
flag=$1; shift
fi
fi
$@ | grep $addr | grep $flag "$word"
}
wait_for_offload() wait_for_offload()
{ {
"$@" | grep -q offload "$@" | grep -q offload
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment