Skip to content

[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
mssonicbld:cherry/202311/11294
Jan 22, 2024
Merged

[action] [PR:11294] [Crm/test_crm_nexthop]: Fix test_crm_nexthop testcase due to all inte…#11340
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/11294

Conversation

@mssonicbld
Copy link
Collaborator

…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 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.
@wangxin wangxin force-pushed the cherry/202311/11294 branch from 4ffcc86 to 44b70a2 Compare January 22, 2024 02:59
@mssonicbld mssonicbld merged commit 52fb7b8 into sonic-net:202311 Jan 22, 2024
@mssonicbld mssonicbld deleted the cherry/202311/11294 branch February 4, 2024 09:44
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.

2 participants