Skip to content

[Crm/test_crm_nexthop]: Fix test_crm_nexthop testcase due to all inte…#11294

Merged
wangxin merged 1 commit intosonic-net:masterfrom
tudupa:crm/test_crm_nexthop
Jan 19, 2024
Merged

[Crm/test_crm_nexthop]: Fix test_crm_nexthop testcase due to all inte…#11294
wangxin merged 1 commit intosonic-net:masterfrom
tudupa:crm/test_crm_nexthop

Conversation

@tudupa
Copy link
Contributor

@tudupa tudupa commented Jan 16, 2024

…rfaces in down state

Description of PR

This PR fixes the testcase test_crm_nexthop failure due to #8051

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

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

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #11340

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 19, 2024
…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.
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 19, 2024
…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.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #11341

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #11342

mssonicbld pushed a commit that referenced this pull request Jan 19, 2024
…ate (#11294)

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.
mssonicbld pushed a commit that referenced this pull request Jan 19, 2024
…ate (#11294)

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.
wangxin pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 22, 2024
…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.
mssonicbld pushed a commit that referenced this pull request Jan 22, 2024
…ate (#11294)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants