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: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e96c8da380
commit
949c84f05e
|
@ -250,12 +250,32 @@ interface_check()
|
|||
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()
|
||||
{
|
||||
RET=0
|
||||
local lc
|
||||
local type
|
||||
local state
|
||||
local nested_devlink_dev
|
||||
|
||||
lc=$LC_SLOT
|
||||
type=$LC_16X100G_TYPE
|
||||
|
@ -268,6 +288,10 @@ activation_16x100G_test()
|
|||
|
||||
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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue