From 360da0ebe809015aa42e3e6d97c1a49b516533ab Mon Sep 17 00:00:00 2001 From: Dashuai Zhang <164845223+sdszhang@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:43:44 +1100 Subject: [PATCH] enable safe reboot for multidut snappi cases. (#14882) Description of PR Summary: Current snappi multidut tests wait 15 minutes to finish a reboot as the default waiting time is 900 seconds for chassis. However, when using safe reload, it will finish the reboot in 10 minutes. Also, existing non multidut test cases have changed to use safe reboot as well. Therefore, setting multidut cases to use safe reboot. Approach What is the motivation for this PR? reduce reboot time for multidut snappi cases. How did you do it? Use safe reboot. How did you verify/test it? Tested on lab devices. co-authorized by: jianquanye@microsoft.com --- .../pfc/test_multidut_pfc_pause_lossless_with_snappi.py | 4 ++-- .../multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py b/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py index ad252692ba..f2dfffdb92 100644 --- a/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py +++ b/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py @@ -259,7 +259,7 @@ def test_pfc_pause_single_lossless_prio_reboot(snappi_api, # no for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]: logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname)) - reboot(duthost, localhost, reboot_type=reboot_type) + reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True) logger.info("Wait until the system is stable") wait_until(180, 20, 0, duthost.critical_services_fully_started) @@ -349,7 +349,7 @@ def test_pfc_pause_multi_lossless_prio_reboot(snappi_api, # noq for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]: logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname)) - reboot(duthost, localhost, reboot_type=reboot_type) + reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True) logger.info("Wait until the system is stable") wait_until(180, 20, 0, duthost.critical_services_fully_started) diff --git a/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py b/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py index d45b7668c9..4b4b47b92b 100644 --- a/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py +++ b/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py @@ -250,7 +250,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811 for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]: logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname)) - reboot(duthost, localhost, reboot_type=reboot_type) + reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True) logger.info("Wait until the system is stable") wait_until(180, 20, 0, duthost.critical_services_fully_started) @@ -340,7 +340,7 @@ def test_pfc_pause_multi_lossy_prio_reboot(snappi_api, # noqa: F811 for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]: logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname)) - reboot(duthost, localhost, reboot_type=reboot_type) + reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True) logger.info("Wait until the system is stable") wait_until(180, 20, 0, duthost.critical_services_fully_started)