Skip to content

Fix "override config" tests to support LT2/FT2#22696

Open
kazinator-arista wants to merge 2 commits intosonic-net:masterfrom
kazinator-arista:master
Open

Fix "override config" tests to support LT2/FT2#22696
kazinator-arista wants to merge 2 commits intosonic-net:masterfrom
kazinator-arista:master

Conversation

@kazinator-arista
Copy link

@kazinator-arista kazinator-arista commented Mar 3, 2026

Description of PR

This PR gets two test cases working, which fail due to finding a discrepancy
in two tables.

The fix is to ignore the FEATURE and PORT tables in the test, which
have some run-time configuration state that is altered when the golden
config is overridden empty. FEATURE is missing the "BMP" node, and
records in PORT are missing "fec" : "rs" fields.

The first commit in the PR is an improvement in the diagnostic that occurs
when these tests fail due to a configuration discrepancy. Rather than stopping
on the first discrepancy (non-matching configuration table), all mismatches
are identified, and reported in a single exception.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • [X ] 202505
  • [X ] 202511

How did you verify/test it?

Failing tests went green on LT2 and FT2 DUTs in our test bed, without regressions in numerous other duts.

* tests/override_config_table/test_override_config_table.py
(load_minigraph_with_golden_empty_input): This function
asserts on the first discrepancy found. We instead gather the
names of the nonmatching tables into a list, and assert if the
list is not empty, showing the list in the assertion message.

* tests/override_config_table/test_override_config_table_masic.py:
Similar changes to multi-asic version of test
(load_minigraph_with_golden_empty_input): The difference is
that rather than gathering names of nonmatching tables,
we have (asic, tasble) tuples.
In the test case test_load_minigraph_with_golden_config, the function
load_minigraph_with_golden_empty_input asserts. This function expects all the
tables to be identical after the golden config is overridden to be empty.  But
it looks as if the golden config is the source of several configurations: the
"BMP" table, and "fec" : "rs" entries in the "PORT".  Thus, when the golden
config is replaced with an empty configuration, the entire "BMP" table,
well as those "fec" properties in the "PORT" table, disappear.

We propose a variable GOLDEN_OVERRIDDEN_TABLES for additional tables
which that function should skip. This is similar to the existing variable
NON_USER_CONFIG_TABLES which non-user-config tables that need to be skipped.

tests/override_config_table/test_override_config_table.py
(GOLDEN_OVERRIDDEN_TABLES): New variable.
(load_minigraph_with_golden_empty_input): Skip tables found in
GOLDEN_OVERRIDDEN_TABLES.

tests/override_config_table/test_override_config_table_masic.py:
Same changes as in test_override_config_table.py.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 3, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Request for msft-202503 Branch Request for 202511 branch Request to backport a change to 202511 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants