summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDanielle Ratson <danieller@mellanox.com>2019-10-17 09:55:15 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-18 10:05:37 -0700
commit49c65e4ff19772847e030e04121bece0517eb32c (patch)
treecb1220105e30514a1712993bbe124d7014454c87 /tools
parent868678c574ecbd09d14331cf3b5418b5b28f7288 (diff)
selftests: mlxsw: Generalize the parameters of mirror_gre test
Use the number of analyzers taken from the devlink command, instead of hard-coded value, in order to make the test more generic. Signed-off-by: Danielle Ratson <danieller@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh
index 8d2186c7c62b..f7c168decd1e 100644
--- a/tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh
@@ -4,10 +4,13 @@ source ../mirror_gre_scale.sh
mirror_gre_get_target()
{
local should_fail=$1; shift
+ local target
+
+ target=$(devlink_resource_size_get span_agents)
if ((! should_fail)); then
- echo 3
+ echo $target
else
- echo 4
+ echo $((target + 1))
fi
}