Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-2 cases and enhancing set-1 smartswitch cases #16020

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
26 changes: 14 additions & 12 deletions tests/smartswitch/platform_tests/test_reload_dpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
from tests.common.utilities import wait_until
from tests.common.platform.processes_utils import wait_critical_processes
from tests.common.reboot import reboot, wait_for_startup, REBOOT_TYPE_COLD
from tests.common.helpers.platform_api import module
from tests.smartswitch.common.device_utils_dpu import (
get_dpu_link_status,
check_dpu_ping_status,
check_dpu_link_and_status,
check_dpu_module_status,
execute_dpu_commands,
check_dpu_reboot_cause,
num_dpu_modules
num_dpu_modules # noqa: F401
nissampa marked this conversation as resolved.
Show resolved Hide resolved
)
from tests.common.platform.device_utils import platform_api_conn # noqa: F401,F403

Expand All @@ -27,8 +28,8 @@

nissampa marked this conversation as resolved.
Show resolved Hide resolved

def test_dpu_ping_after_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, # noqa F811
num_dpu_modules):
localhost,
platform_api_conn, num_dpu_modules): # noqa F811, E501
"""
@summary: Verify output of `config chassis modules startup <DPU_Number>`
"""
Expand Down Expand Up @@ -66,7 +67,8 @@ def test_dpu_ping_after_reboot(duthosts, enum_rand_one_per_hwsku_hostname,


def test_show_ping_int_after_reload(duthosts, enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, num_dpu_modules): # noqa F811
localhost,
platform_api_conn, num_dpu_modules): # noqa F811, E501
"""
@summary: To Check Ping between NPU and DPU
after configuration reload on NPU
Expand Down Expand Up @@ -96,8 +98,8 @@ def test_show_ping_int_after_reload(duthosts, enum_rand_one_per_hwsku_hostname,

def test_memory_exhaustion_on_switch(duthosts,
enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, # noqa: F811, E501
num_dpu_modules):
localhost,
platform_api_conn, num_dpu_modules): # noqa: F811, E501
"""
@summary: Test memory exhaustion on NPU by running a heavy process,
followed by a reboot of the NPU.
Expand Down Expand Up @@ -140,8 +142,8 @@ def test_memory_exhaustion_on_switch(duthosts,

def test_kernel_panic_on_switch(duthosts,
enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, # noqa: F811, E501
num_dpu_modules):
localhost,
platform_api_conn, num_dpu_modules): # noqa: F811, E501
"""
@summary: Test NPU recovery from a kernel panic,
followed by a reboot of the NPU.
Expand Down Expand Up @@ -181,8 +183,8 @@ def test_kernel_panic_on_switch(duthosts,


def test_kernel_panic_on_dpu(duthosts, enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, # noqa: F811
num_dpu_modules):
localhost,
platform_api_conn, num_dpu_modules): # noqa: F811, E501
"""
@summary: To Verify `kernel panic on dpu`
nissampa marked this conversation as resolved.
Show resolved Hide resolved
"""
Expand Down Expand Up @@ -239,8 +241,8 @@ def test_kernel_panic_on_dpu(duthosts, enum_rand_one_per_hwsku_hostname,


def test_memory_exhaustion_on_dpu(duthosts, enum_rand_one_per_hwsku_hostname,
localhost, platform_api_conn, # noqa: F811
num_dpu_modules):
localhost,
platform_api_conn, num_dpu_modules): # noqa: F811, E501
"""
@summary: To Verify `kernel panic on dpu`
nissampa marked this conversation as resolved.
Show resolved Hide resolved
"""
Expand Down
21 changes: 8 additions & 13 deletions tests/smartswitch/platform_tests/test_show_platform_dpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from datetime import datetime
from tests.common.utilities import wait_until
from tests.common.helpers.assertions import pytest_assert
from tests.common.helpers.platform_api import module
from tests.smartswitch.common.device_utils_dpu import (
check_dpu_ping_status,
check_dpu_module_status,
Expand All @@ -15,7 +16,7 @@
execute_dpu_commands,
parse_dpu_memory_usage,
parse_system_health_summary,
num_dpu_modules
num_dpu_modules # noqa: F401
)
from tests.common.platform.device_utils import platform_api_conn # noqa: F401,F403

Expand Down Expand Up @@ -144,8 +145,7 @@ def test_pcie_link(duthosts, enum_rand_one_per_hwsku_hostname,


def test_restart_pmon(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: Verify `DPU status and pcie Link after restart pmon`
"""
Expand Down Expand Up @@ -178,8 +178,7 @@ def test_restart_pmon(duthosts, enum_rand_one_per_hwsku_hostname,


def test_system_health_state(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: To Verify `show system-health dpu` cli
"""
Expand Down Expand Up @@ -237,8 +236,7 @@ def test_system_health_state(duthosts, enum_rand_one_per_hwsku_hostname,


def test_dpu_console(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: To Verify `DPU console access`
"""
Expand Down Expand Up @@ -267,8 +265,7 @@ def test_dpu_console(duthosts, enum_rand_one_per_hwsku_hostname,


def test_npu_dpu_date(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: Verify `Date sync in NPU and DPU`
It also verifies in turn the RTC clock sync
Expand Down Expand Up @@ -302,8 +299,7 @@ def test_npu_dpu_date(duthosts, enum_rand_one_per_hwsku_hostname,


def test_dpu_memory(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: Verify `show system-memory in DPU`
against the threshold value set in
Expand Down Expand Up @@ -333,8 +329,7 @@ def test_dpu_memory(duthosts, enum_rand_one_per_hwsku_hostname,


def test_system_health_summary(duthosts, enum_rand_one_per_hwsku_hostname,
platform_api_conn, # noqa: F811
num_dpu_modules):
platform_api_conn, num_dpu_modules): # noqa: F811
"""
@summary: To Verify `show system-health summary` cli
It verifies all hw, sw and service status are OK
Expand Down
Loading