selftests: mlxsw: Check line card info on provisioned line card

Once line card is provisioned, check if HW revision and INI version
are exposed.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2022-04-25 06:44:28 +03:00 коммит произвёл David S. Miller
Родитель 3b37130f48
Коммит 08682c9e58
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -178,6 +178,22 @@ supported_types_check()
check_err $? "16X100G not found between supported types of linecard $lc"
}
lc_info_check()
{
local lc=$1
local fixed_hw_revision
local running_ini_version
fixed_hw_revision=$(devlink lc -v info $DEVLINK_DEV lc $lc -j | \
jq -e -r '.[][][].versions.fixed."hw.revision"')
check_err $? "Failed to get linecard $lc fixed.hw.revision"
log_info "Linecard $lc fixed.hw.revision: \"$fixed_hw_revision\""
running_ini_version=$(devlink lc -v info $DEVLINK_DEV lc $lc -j | \
jq -e -r '.[][][].versions.running."ini.version"')
check_err $? "Failed to get linecard $lc running.ini.version"
log_info "Linecard $lc running.ini.version: \"$running_ini_version\""
}
lc_devices_check()
{
local lc=$1
@ -228,6 +244,7 @@ provision_test()
fi
provision_one $lc $LC_16X100G_TYPE
lc_devices_check $lc $LC_16X100G_DEVICE_COUNT
lc_info_check $lc
ports_check $lc $LC_16X100G_PORT_COUNT
log_test "Provision"
}