[action] [PR:27309] [console] Use mapped fanout ports in loopback test - #1371
Merged
Merged
Conversation
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fix `test_console_loopback` for c0 topologies where a DUT console line and its connected fanout line use different port numbers. The test now resolves the fanout port from `device_serial_link` instead of reusing the DUT port number. Fixes # (issue) <!-- If you request a backport/cherry-pick below, link the GitHub issue or ADO work item here (for example, "Fixes #<issue>" or "ADO: <work item URL>"). --> ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [x] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request <!-- Only check a release or feature branch when the PR links a GitHub issue or ADO work item above. The linked tracker should explain the failure in detail, including whether it is a day-one issue or a regression, the affected branch/image/platform/test, and why this branch needs the fix. Backport or cherry-pick requests without a linked issue/work item may not be favored. If you request a backport/cherry-pick, provide both: 1. A GitHub issue or Microsoft ADO work item tracking the change. 2. Test evidence from the target branch(es) requested below. --> - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 - [ ] 202512 - [ ] 202605 Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO): N/A Failure type: N/A ### Tested branch <!-- Select each branch where the change was tested. If you request a backport/cherry-pick, select the base branch and the tested target release branch(es). --> - [x] master - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 - [ ] 202512 - [ ] 202605 - [ ] N/A ### Test result <!-- Provide the tested image version and test evidence for each selected branch. For example: - master: 20260716.01 - <test result or link> - 202605: 20260531.42 - <test result or link> --> - master: flake8, syntax validation, mapping smoke test, and pytest collection passed (8 cases collected). - Physical c0 validation on Nokia-7215-C1-G3 with SONiC image `20260310.19`: `8 passed, 0 failed, 0 skipped`. ### Approach #### What is the motivation for this PR? `*_serial_links.csv` records both the DUT line number and the connected fanout line number. These values are not always identical. The test selected DUT lines from the graph but incorrectly reused those numbers for fanout loopback and bridge operations, causing all data-path checks to time out when the fanout used different ports. #### How did you do it? Added a helper that resolves and validates each DUT line's fanout `peerport` from `device_serial_link`. Echo tests now loop back the mapped fanout port, and ping-pong tests bridge the two mapped fanout ports. Reverse-SSH session state checks remain on the corresponding DUT lines. #### How did you verify/test it? <!-- Summarize the overall validation here. For a backport/cherry-pick request, provide branch-specific image versions and evidence in the Test result section. --> Before the change, all 8 echo and ping-pong combinations failed on a c0 testbed whose DUT lines `1/2` mapped to different fanout lines. After the change, all 8 combinations passed at 9600 and 115200 baud with flow control enabled and disabled. #### Any platform specific information? Physically verified on Nokia-7215-C1-G3. The fix is graph-driven and not platform-specific. #### Supported testbed topology if it's a new test case? N/A. This fixes an existing test for c0 topology and preserves existing c0-lo behavior. ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> N/A. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-mgmt#27309 |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fix
test_console_loopbackfor c0 topologies where a DUT console line and its connected fanout line use different port numbers. The test now resolves the fanout port fromdevice_serial_linkinstead of reusing the DUT port number.Fixes # (issue)
Type of change
Back port request
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO): N/A
Failure type: N/A
Tested branch
Test result
20260310.19:8 passed, 0 failed, 0 skipped.Approach
What is the motivation for this PR?
*_serial_links.csvrecords both the DUT line number and the connected fanout line number. These values are not always identical. The test selected DUT lines from the graph but incorrectly reused those numbers for fanout loopback and bridge operations, causing all data-path checks to time out when the fanout used different ports.How did you do it?
Added a helper that resolves and validates each DUT line's fanout
peerportfromdevice_serial_link. Echo tests now loop back the mapped fanout port, and ping-pong tests bridge the two mapped fanout ports. Reverse-SSH session state checks remain on the corresponding DUT lines.How did you verify/test it?
Before the change, all 8 echo and ping-pong combinations failed on a c0 testbed whose DUT lines
1/2mapped to different fanout lines. After the change, all 8 combinations passed at 9600 and 115200 baud with flow control enabled and disabled.Any platform specific information?
Physically verified on Nokia-7215-C1-G3. The fix is graph-driven and not platform-specific.
Supported testbed topology if it's a new test case?
N/A. This fixes an existing test for c0 topology and preserves existing c0-lo behavior.
Documentation
N/A.
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com