Skip to content

[action] [PR:11444] [CoPP] Enhancing ptftests/py3/copp_tests.py testcase to handle no trap condition#11539

Merged
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/11444
Feb 1, 2024
Merged

[action] [PR:11444] [CoPP] Enhancing ptftests/py3/copp_tests.py testcase to handle no trap condition#11539
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/11444

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

…copp_tests.py

Description of PR

This PR fixes Issue#11434 which caused failure in test_copp.py::test_add_new_trap and test_remove_trap. The test uninstalls trap as first step in test and sends traffic to verify uninstallation of the trap. Since trap is disabled, no packets are expected from DUT to PTF, so rx_pps will be 0.
But, in PR#8199, BGPTest was has policer limit and was changed to PolicyTest and it does not have the condition to check for trap status, thus failing test_copp.py when trap is disabled

Summary:
Fixes # (issue)
Fixes Issue#11434

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

To fix copp tests failure caused by missing condition to check trap status

How did you do it?

Added conditon to check trap status and compare packet rate accordingly in ptftests/copp_tests.py

How did you verify/test it?

Run test_copp.py::test_add_new_trap and test_remove_trap on M0/MX topology

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…copp_tests.py (sonic-net#11444)

This PR fixes Issue#11434 which caused failure in test_copp.py::test_add_new_trap and test_remove_trap. The test uninstalls trap as first step in test and sends traffic to verify uninstallation of the trap. Since trap is disabled, no packets are expected from DUT to PTF, so rx_pps will be 0.
But, in PR#8199, BGPTest was has policer limit and was changed to PolicyTest and it does not have the condition to check for trap status, thus failing test_copp.py when trap is disabled

What is the motivation for this PR?
To fix copp tests failure caused by missing condition to check trap status

How did you do it?
Added conditon to check trap status and compare packet rate accordingly in ptftests/copp_tests.py

How did you verify/test it?
Run test_copp.py::test_add_new_trap and test_remove_trap on M0/MX topology
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #11444

@mssonicbld mssonicbld merged commit a3222a7 into sonic-net:202311 Feb 1, 2024
@mssonicbld mssonicbld deleted the cherry/202311/11444 branch February 4, 2024 09:59
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