From b22b0b0b10aa16bfe020f0ce506ab78a4d8a5fd4 Mon Sep 17 00:00:00 2001 From: Danielle Ratson Date: Mon, 18 Nov 2019 09:49:59 +0200 Subject: 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 Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh') 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() -- cgit v1.2.3-59-g8ed1b