Skip to content

Test_Passive_Peering - T2 Update - #26896

Open
sresri2 wants to merge 2 commits into
sonic-net:masterfrom
sresri2:Test_Passive_Peering---T2-Update
Open

Test_Passive_Peering - T2 Update#26896
sresri2 wants to merge 2 commits into
sonic-net:masterfrom
sresri2:Test_Passive_Peering---T2-Update

Conversation

@sresri2

@sresri2 sresri2 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Enable test_passive_peering on T2 multi-ASIC by scoping BGP config commands to the correct ASIC namespace and removing the T2 skip.

The test validates BGP passive peering and password authentication on T2 linecards. It identifies which ASIC owns the LLDP neighbor and resolves the namespace, but all config commands used -n {asic_index} instead of the namespace name (-n asic0). Then, on multi-ASIC T2, config changes hit the wrong BGP instance, causing false failures. Session state checks via were already correct.

Changes:

  • Route DUT and sonic-neighbor commands through get_vtysh_cmd_for_asic() (similar to other multi-ASIC BGP tests).
  • 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 topology, vtysh must target the ASIC namespace that owns the neighbor session. The test used numeric ASIC indices instead of namespace names, so passive/password config did not apply to the correct BGP instance.

How did you do it?

  • Replaced vtysh -n {asic_index} ... commands with get_vtysh_cmd_for_asic() for all DUT config steps.
  • Applied the same helper for sonic-neighbor password config.
  • BGP neighbor state check functionality is unchanged as it already used ASIC index.
  • Removed the T2 skip from tests_mark_conditions_vs_t2.yaml.

How did you verify/test it?

  • Code review for quality and functionality.
  • Code review for consistency with other BGP T2 tests.
  • Full validation for T2 (and all) topologies via GitHub checks / pipeline.

Any platform specific information?

N/A

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

Existing test, updated logic to support T2.

Documentation

N/A.

sresri2 added 2 commits August 7, 2026 15:53
Signed-off-by: sresri2 <125845681+sresri2@users.noreply.github.com>
Signed-off-by: sresri2 <125845681+sresri2@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@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.

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