Commit 949c84f0 authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski

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

Once line card is activated, check the FW version and PSID are exposed.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e96c8da3
...@@ -250,12 +250,32 @@ interface_check() ...@@ -250,12 +250,32 @@ interface_check()
setup_wait setup_wait
} }
lc_dev_info_active_check()
{
local lc=$1
local nested_devlink_dev=$2
local fixed_device_fw_psid
local running_device_fw
fixed_device_fw_psid=$(devlink dev info $nested_devlink_dev -j | \
jq -e -r ".[][].versions.fixed" | \
jq -e -r '."fw.psid"')
check_err $? "Failed to get linecard $lc fixed fw PSID"
log_info "Linecard $lc fixed.fw.psid: \"$fixed_device_fw_psid\""
running_device_fw=$(devlink dev info $nested_devlink_dev -j | \
jq -e -r ".[][].versions.running.fw")
check_err $? "Failed to get linecard $lc running.fw.version"
log_info "Linecard $lc running.fw: \"$running_device_fw\""
}
activation_16x100G_test() activation_16x100G_test()
{ {
RET=0 RET=0
local lc local lc
local type local type
local state local state
local nested_devlink_dev
lc=$LC_SLOT lc=$LC_SLOT
type=$LC_16X100G_TYPE type=$LC_16X100G_TYPE
...@@ -268,6 +288,10 @@ activation_16x100G_test() ...@@ -268,6 +288,10 @@ activation_16x100G_test()
interface_check interface_check
nested_devlink_dev=$(lc_nested_devlink_dev_get $lc)
check_err $? "Failed to get nested devlink handle of linecard $lc"
lc_dev_info_active_check $lc $nested_devlink_dev
log_test "Activation 16x100G" log_test "Activation 16x100G"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment