Add mutli-asic support for ipfwd/test_dip_sip test#22580
Closed
arista-setu wants to merge 2 commits intosonic-net:masterfrom
Closed
Add mutli-asic support for ipfwd/test_dip_sip test#22580arista-setu wants to merge 2 commits intosonic-net:masterfrom
arista-setu wants to merge 2 commits intosonic-net:masterfrom
Conversation
Add a function to correct ASIC for the nexthops before adding or deleting route. Signed-off-by: setu <setu@arista.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run Azure.sonic-mgmt |
Collaborator
|
/AzurePipelines run Azure.sonic-mgmt |
|
Azure Pipelines successfully started running 1 pipeline(s). |
rawal01
reviewed
Mar 18, 2026
| res = asic.command(f"{ip_cmd} route get {nexthop_ip}") | ||
| if res['rc'] == 0 and "unreachable" not in res.get('stdout', ''): | ||
| return asic | ||
| except Exception: |
Contributor
There was a problem hiding this comment.
Since gather_facts gets facts for chosen random frontend asic we do not need this condition if you use enum_rand_one_frontend_asic_index like in PR #19931
Contributor
Author
There was a problem hiding this comment.
Thanks for reviewing the PR. I agree using enum_rand_one_frontend_asic_index would be better in this case as then we would not need the for loop and condition.
I see PR #19931 is approved and merge ready. I am okay if we wanna go with that solution.
Contributor
Author
|
Merged PR #19931 which address the same issue. Closing this PR. |
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
This PR adds multi-asic support for ipfwd/test_dip_sip.py sonic-mgmt tests.
Type of change
Back port request
Approach
What is the motivation for this PR?
All test cases in sonic-mgmt test test_dip_sip.py are currently failing on mutli-asic.
How did you do it?
Add a function to determine asic namspace for the nexthop ip before adding or deleting route to make sure nexthop IP is reachable.
How did you verify/test it?
With test changes the test passes on mutli-asic and on single-asic systems :
Results from run on multi-asic:
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzd541-0-ipv4_same_sip_dip] ✓
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzd541-0-ipv4_different_sip_dip_connectedroute] ✓
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzd541-0-ipv4_different_sip_dip_staticrouteprefix]
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzd541-0-ipv6_same_sip_dip] ✓
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzd541-0-ipv6_different_sip_dip_connectedroute] ✓
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzd541-0-ipv6_different_sip_dip_staticrouteprefix] ✓
Results (695.27s (0:11:35)):
6 passed
Results from run on single-asic:
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzo204-None-ipv4_same_sip_dip] ✓ 17%
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzo204-None-ipv4_different_sip_dip_connectedroute] ✓33%
ipfwd/test_dip_sip.py::test_ipv4_forwarding[qzo204-None-ipv4_different_sip_dip_staticrouteprefix] ✓50%
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzo204-None-ipv6_same_sip_dip] ✓ 67%
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzo204-None-ipv6_different_sip_dip_connectedroute] ✓83%
ipfwd/test_dip_sip.py::test_ipv6_forwarding[qzo204-None-ipv6_different_sip_dip_staticrouteprefix] ✓100%
Results (330.66s (0:05:30)):
6 passed
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation