diff --git a/tests/bgp/test_startup_tsa_tsb_service.py b/tests/bgp/test_startup_tsa_tsb_service.py index aa5795e257a..66b66ad6db4 100644 --- a/tests/bgp/test_startup_tsa_tsb_service.py +++ b/tests/bgp/test_startup_tsa_tsb_service.py @@ -633,11 +633,14 @@ def config_reload_linecard_if_unhealthy(lc): executor.submit(config_reload_linecard_if_unhealthy, linecard) for linecard in duthosts.frontend_nodes: - # Make sure the dut's reboot cause is as expected - logger.info("Check reboot cause of the dut {}".format(linecard)) - reboot_cause = get_reboot_cause(linecard) - pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, - "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) + # Arista platforms currently return an unexpected reboot-cause in certain test cases + # https://github.com/aristanetworks/sonic/issues/118 + if 'arista_7800' not in linecard.facts['platform'].lower(): + # Make sure the dut's reboot cause is as expected + logger.info("Check reboot cause of the dut {}".format(linecard)) + reboot_cause = get_reboot_cause(linecard) + pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, + "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) # Make sure the Supervisor's reboot cause is as expected logger.info("Check reboot cause of the supervisor") @@ -797,11 +800,15 @@ def config_reload_linecard_if_unhealthy(lc): executor.submit(config_reload_linecard_if_unhealthy, linecard) for linecard in duthosts.frontend_nodes: - # Make sure the dut's reboot cause is as expected - logger.info("Check reboot cause of the dut {}".format(linecard)) - reboot_cause = get_reboot_cause(linecard) - pytest_assert(reboot_cause == SUP_HEARTBEAT_LOSS_CAUSE, - "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_HEARTBEAT_LOSS_CAUSE)) + # Arista platforms currently return an unexpected reboot-cause in certain test cases + # https://github.com/aristanetworks/sonic/issues/118 + if 'arista_7800' not in linecard.facts['platform'].lower(): + # Make sure the dut's reboot cause is as expected + logger.info("Check reboot cause of the dut {}".format(linecard)) + reboot_cause = get_reboot_cause(linecard) + pytest_assert(reboot_cause == SUP_HEARTBEAT_LOSS_CAUSE, + "Reboot cause {} did not match the trigger {}".format( + reboot_cause, SUP_HEARTBEAT_LOSS_CAUSE)) # Make sure the Supervisor's reboot cause is as expected logger.info("Check reboot cause of the supervisor") @@ -1360,11 +1367,14 @@ def config_reload_linecard_if_unhealthy(lc): executor.submit(config_reload_linecard_if_unhealthy, linecard) for linecard in duthosts.frontend_nodes: - # Make sure the dut's reboot cause is as expected - logger.info("Check reboot cause of the dut {}".format(linecard)) - reboot_cause = get_reboot_cause(linecard) - pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, - "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) + # Arista platforms currently return an unexpected reboot-cause in certain test cases + # https://github.com/aristanetworks/sonic/issues/118 + if 'arista_7800' not in linecard.facts['platform'].lower(): + # Make sure the dut's reboot cause is as expected + logger.info("Check reboot cause of the dut {}".format(linecard)) + reboot_cause = get_reboot_cause(linecard) + pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, + "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) # Make sure the Supervisor's reboot cause is as expected logger.info("Check reboot cause of the supervisor") @@ -1641,11 +1651,14 @@ def config_reload_linecard_if_unhealthy(lc): executor.submit(config_reload_linecard_if_unhealthy, linecard) for linecard in duthosts.frontend_nodes: - # Make sure the dut's reboot cause is as expected - logger.info("Check reboot cause of the dut {}".format(linecard)) - reboot_cause = get_reboot_cause(linecard) - pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, - "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) + # Arista platforms currently return an unexpected reboot-cause in certain test cases + # https://github.com/aristanetworks/sonic/issues/118 + if 'arista_7800' not in linecard.facts['platform'].lower(): + # Make sure the dut's reboot cause is as expected + logger.info("Check reboot cause of the dut {}".format(linecard)) + reboot_cause = get_reboot_cause(linecard) + pytest_assert(reboot_cause == SUP_REBOOT_CAUSE, + "Reboot cause {} did not match the trigger {}".format(reboot_cause, SUP_REBOOT_CAUSE)) # Make sure the Supervisor's reboot cause is as expected logger.info("Check reboot cause of the supervisor")