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: Danielle Ratson <danieller@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0c22f993c9
commit
05ef614c55
@@ -248,6 +248,28 @@ busywait()
|
||||
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()
|
||||
{
|
||||
"$@" | grep -q offload
|
||||
|
Reference in New Issue
Block a user