Commit 002defd5 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

selftests: mlxsw: Check device info on activated line card

Once line card is activated, check the device FW version is exposed.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e932b4bd
......@@ -259,6 +259,26 @@ interface_check()
setup_wait
}
lc_devices_info_check()
{
local lc=$1
local expected_device_count=$2
local device_count
local device
local running_device_fw
device_count=$(devlink lc info $DEVLINK_DEV lc $lc -j | \
jq -e -r ".[][][].devices |length")
check_err $? "Failed to get linecard $lc device count"
for (( device=0; device<device_count; device++ ))
do
running_device_fw=$(devlink lc -v info $DEVLINK_DEV lc $lc -j | \
jq -e -r ".[][][].devices[$device].versions.running.fw")
check_err $? "Failed to get linecard $lc device $device running fw version"
log_info "Linecard $lc device $device running.fw: \"$running_device_fw\""
done
}
activation_16x100G_test()
{
RET=0
......@@ -275,6 +295,8 @@ activation_16x100G_test()
$ACTIVATION_TIMEOUT)
check_err $? "Failed to get linecard $lc activated (timeout)"
lc_devices_info_check $lc $LC_16X100G_DEVICE_COUNT
interface_check
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