[action] [PR:23225] Enable dynamic port selection from setup in snappi pfcwd test#23369
Merged
vmittal-msft merged 1 commit intosonic-net:202511from Mar 27, 2026
Merged
Conversation
…ction from setup in snappi (sonic-net#23225) Replace setup_ports_and_dut with tgen_port_info fixture in test_pfcwd_basic_with_snappi.py for dynamic port selection Signed-off-by: Edi Wibowo <ediwibowo@microsoft.com> Signed-off-by: mssonicbld <sonicbld@microsoft.com>
12 tasks
Collaborator
Author
|
Original PR: #23225 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vmittal-msft
approved these changes
Mar 27, 2026
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:
Adapt the PFC watchdog basic snappi test to use the
tgen_port_infofixture for dynamic port selection, aligning with the refactoring introduced in PR #18067. Also fix a fixture scope mismatch and improve reboot test reliability.Type of change
Back port request
Approach
What is the motivation for this PR?
PR #18067 refactored snappi port selection by introducing
tgen_port_infoandsnappi_port_selectionfixtures. The pfcwd basic test needed to be updated to consume these new fixtures instead of directly callingsetup_ports_and_dutin each test body.How did you do it?
setup_ports_and_dutusage in all 6 test function bodies with thetgen_port_infofixture parametersetup_ports_and_dutfrom test function signatures where it was no longer used in the bodynumber_of_tx_rx_portsfixture scope fromfunction(default) tomoduleto match the module-scopedsnappi_port_selectiondependencysnappi_port_selectionto imports (was missing)save_restore_configto usetgen_port_infofixture parameter.save_restore_configneedstgen_port_infoto get thesnappi_portslist, which containsduthosthandles for each port. It uses those to identify which DUTs to back up and restore config on.How did you verify/test it?
Validated on a T0/T1 and T2 chassis testbed (Cisco 8800) with IXIA traffic generator:
test_pfcwd_basic_single_lossless_prio— PASSEDtest_pfcwd_basic_multi_lossless_prio— PASSEDtest_pfcwd_basic_single_lossless_prio_reboot(cold reboot) — PASSEDtest_pfcwd_basic_multi_lossless_prio_reboot(cold reboot) — PASSEDtest_pfcwd_basic_single_lossless_prio_service_restart— PASSEDtest_pfcwd_basic_multi_lossless_prio_restart_service— PASSEDAny platform specific information?
T0/T1: Tested on Arista 8102 (single-ASIC per linecard)
T2: Tested on Cisco 8800 modular chassis (multi-ASIC, 3 ASICs per linecard).
Supported testbed topology if it's a new test case?
N/A — existing test, supports
multidut-tgenandtgentopologies.Documentation
N/A