From 939b6a713de0ea8c2e80a9d4e8b3863ec9cff08d Mon Sep 17 00:00:00 2001 From: vkjammala-arista <152394203+vkjammala-arista@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:21:03 +0530 Subject: [PATCH] Fix route/test_forced_mgmt_route.py (#13118) What is the motivation for this PR? Test is tampering the running config of the duthost and leaving the config in this state. This is causing failures during teardown core_dump_and_config_check is failing during config_db_check. Also seeing loganalyzer failures with symptom similar to ERR syncd#syncd: [none] SAI_API_UNSPECIFIED:sai_api_query:449 Invalid sai_api_t 50 passed to sai_api_query ... (mostly due to config changes) How did you do it? Perform "config_reload" with the backup config as part of fixture teardown (backup_restore_config). How did you verify/test it? Test is passing consistently with the fix (verified on Arista-7260CX3-C64), verified on 202305 and 202311 branches. --- tests/route/test_forced_mgmt_route.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/route/test_forced_mgmt_route.py b/tests/route/test_forced_mgmt_route.py index 0b05159a7e1..902a8b3a90f 100644 --- a/tests/route/test_forced_mgmt_route.py +++ b/tests/route/test_forced_mgmt_route.py @@ -3,6 +3,7 @@ import logging import pytest +from tests.common.config_reload import config_reload from tests.common.helpers.assertions import pytest_assert from tests.common.utilities import wait_until from tests.override_config_table.utilities import backup_config, restore_config, \ @@ -41,6 +42,7 @@ def backup_restore_config(duthosts, enum_rand_one_per_hwsku_hostname): # Restore config after test finish restore_config(duthost, CONFIG_DB, CONFIG_DB_BACKUP) + config_reload(duthost) def get_interface_reload_timestamp(duthost):