Skip to content

Test_Prefix_List - T2 Update - #26895

Open
sresri2 wants to merge 1 commit into
sonic-net:masterfrom
sresri2:Test_Prefix_List-T2-Update
Open

Test_Prefix_List - T2 Update#26895
sresri2 wants to merge 1 commit into
sonic-net:masterfrom
sresri2:Test_Prefix_List-T2-Update

Conversation

@sresri2

@sresri2 sresri2 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Enable test_prefix_list on T2 multi-ASIC by fixing per-ASIC BGP/FIB verification and removing the T2 skip.

test_prefix_list.py already loops over frontend ASICs, but the BGP check used an incorrect namespace, which could falsely report routes missing on multi-ASIC T2. The FIB check used the correct format but was open-coded. The test was skipped on VS T2.

Changes:

  • Use shared multi-ASIC helpers in BGP/FIB verification (same method as test_prefix_list_suppress.py).
  • Remove the VS T2 conditional skip for this test.

Type of change

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

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • N/A

Test result

N/A

Approach

What is the motivation for this PR?

On multi-ASIC chassis, BGP verification needs to query each frontend ASIC's BGP instance. The test used the wrong namespace format for BGP checks, while FIB checks already used the correct ASIC namespace. This caused incorrect failures on multi-ASIC T2 even when the necessary routes were present.

How did you do it?

  • Updated verify_prefix_in_bgp_table() to build vtysh commands by ASIC.
  • Updated verify_prefix_in_fib_table() to use get_db_cli_prefix() for consistency with the other multi-ASIC BGP tests.
  • Removed the T2 skip from tests_mark_conditions_vs_t2.yaml.

How did you verify/test it?

  • Code review to check functionality.
  • Code review for consistency with existing multi-ASIC tests/functionality, such as in tests/common/helpers/bgp.py.
  • Full validation of functionality on all topologies using GitHub checks / pipeline.

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

Existing test, updated logic for T2.

Documentation

N/A - simple test logic update for T2.

Signed-off-by: sresri2 <125845681+sresri2@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

@StormLiangMS @wangxin @yxieca A user wants to merge changes to the conditional mark files into master. Please review.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants