[action] [PR:11294] [Crm/test_crm_nexthop]: Fix test_crm_nexthop testcase due to all inte…#11340
Merged
mssonicbld merged 1 commit intosonic-net:202311from Jan 22, 2024
Merged
Conversation
7 tasks
Collaborator
Author
|
Original PR: #11294 |
…ate (sonic-net#11294) What is the motivation for this PR? In the PR - sonic-net#8051: There was a new fixture added to shut down all interfaces before the testcase (test_crm_nexthop) starts. This however does not work well for test_crm_nexthop testcase. This testcase adds a static route via one of the ptf interfaces(ethernet1). The interface which is directly connected to the PTF's interface needs to be up in order for the added static route to be effective. Only if it is up, the crm resources will be utilized and the used and available counter for ipv4_nexthop will be incremented and decremented respectively. Since all interfaces are shut down, the static route added by this testcase wont be effective and hence will not use any crm resources. How did you do it? The fix here is to bring up the interface used in the testcase so that the static route added will be in effect and the crm resource will be utilized. Since the interface in test is "Ethernet1", code is added to bring this interface up and then continue the testcase. How did you verify/test it? Ran test_crm_nexthop to see if the testcase passes both ipv4 and ipv6 cases.
4ffcc86 to
44b70a2
Compare
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.
…rfaces in down state
Description of PR
This PR fixes the testcase test_crm_nexthop failure due to #8051
Type of change
Back port request
Approach
What is the motivation for this PR?
In the PR - #8051: There was a new fixture added to shut down all interfaces before the testcase (test_crm_nexthop) starts. This however does not work well for test_crm_nexthop testcase. This testcase adds a static route via one of the ptf interfaces(ethernet1). The interface which is directly connected to the PTF's interface needs to be up in order for the added static route to be effective. Only if it is up, the crm resources will be utilized and the used and available counter for ipv4_nexthop will be incremented and decremented respectively. Since all interfaces are shut down, the static route added by this testcase wont be effective and hence will not use any crm resources.
How did you do it?
The fix here is to bring up the interface used in the testcase so that the static route added will be in effect and the crm resource will be utilized. Since the interface in test is "Ethernet1", code is added to bring this interface up and then continue the testcase.
How did you verify/test it?
Ran test_crm_nexthop to see if the testcase passes both ipv4 and ipv6 cases.
Any platform specific information?
NA
Supported testbed topology if it's a new test case?
NA
Documentation
NA