[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 Feb 1, 2024
Conversation
…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
7 tasks
Collaborator
Author
|
Original PR: #11444 |
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.
…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
Back port request
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