Skip to content

Commit 8a2d23c

Browse files
eswaran-nexthopmssonicbld
authored andcommitted
Update expect_regex and ignore_regex for test_duplicate_route to support bulk update mode (#20232)
The sonic-sairedis change from sonic-net/sonic-sairedis#1613 modified the behavior of BULK operations which resulted in the log spew looking different before and after on API failures. This impacts test_duplicate_route.py. As this test is failing with the above sonic-sairedis change included, sonic-buildimage PRs that bump up the submodule reference fail pipeline checks. The fix is to update the regexes so that the test can continue to pass with and without this sonic-sairedis change. Summary: Fixes # 20231
1 parent faec1a3 commit 8a2d23c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/route/test_duplicate_route.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,23 @@ def verify_expected_loganalyzer_logs(
9292
loganalyzer: Loganalyzer utility fixture
9393
"""
9494
expectRegex = [
95-
".*ERR.* meta_sai_validate_route_entry:.* already exists.*",
96-
".*ERR.* status: SAI_STATUS_ITEM_ALREADY_EXISTS.*",
95+
".*ERR.* object key SAI_OBJECT_TYPE_ROUTE_ENTRY:.* already exists.*",
9796
".*ERR.* addRoutePost: Failed to create route.*",
98-
".*ERR.* handleSaiFailure: Encountered failure in create operation, SAI API: SAI_API_ROUTE.*",
9997
]
98+
ignoreRegex = [
99+
".*ERR.* create failed, object already exists.*",
100+
".*ERR.* bulkCreate: Failed to create object.*",
101+
".*ERR.* api SAI_COMMON_API_BULK_CREATE failed in syncd mode.*",
102+
".*ERR.* flush_creating_entries: EntityBulker.flush create entries failed.*",
103+
]
100104
if loganalyzer:
101105
# Skip if loganalyzer is disabled
102106
loganalyzer[enum_rand_one_per_hwsku_frontend_hostname].expect_regex.extend(
103107
expectRegex
104108
)
109+
loganalyzer[enum_rand_one_per_hwsku_frontend_hostname].ignore_regex.extend(
110+
ignoreRegex
111+
)
105112

106113

107114
@pytest.fixture(scope="module", autouse=True)

0 commit comments

Comments
 (0)