selftests: mlxsw: Use busywait helper in blackhole routes test

Blackhole routes test uses offload indication checks.

Use busywait helper and wait until the routes 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:
Danielle Ratson
2020-02-27 08:50:11 +01:00
committed by David S. Miller
parent 5d66773f41
commit 0c22f993c9
2 changed files with 8 additions and 2 deletions

View File

@@ -248,6 +248,11 @@ busywait()
done
}
wait_for_offload()
{
"$@" | grep -q offload
}
until_counter_is()
{
local value=$1; shift