summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielle Ratson <danieller@mellanox.com>2019-11-18 09:49:59 +0200
committerDavid S. Miller <davem@davemloft.net>2019-11-18 17:11:54 -0800
commitb22b0b0b10aa16bfe020f0ce506ab78a4d8a5fd4 (patch)
tree1af63c1adbb0acf7833d953051c8832a2431f51e
parent0fed96fa8342a14de7715fe37ae35cb5775bdced (diff)
selftests: mlxsw: Check devlink device before running test
The scale test for Spectrum-2 should only be invoked for Spectrum-2. Skip the test otherwise. Signed-off-by: Danielle Ratson <danieller@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
index 27a712a5ed8e..7b2acba82a49 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
@@ -8,6 +8,11 @@ source $lib_dir/lib.sh
source $lib_dir/tc_common.sh
source $lib_dir/devlink_lib.sh
+if [ "$DEVLINK_VIDDID" != "15b3:cf6c" ]; then
+ echo "SKIP: test is tailored for Mellanox Spectrum-2"
+ exit 1
+fi
+
current_test=""
cleanup()