Catch exception for test_tunnel_memory_leak and add debug info#7209
Merged
ZhaohuiS merged 2 commits intosonic-net:masterfrom Jan 9, 2023
Merged
Catch exception for test_tunnel_memory_leak and add debug info#7209ZhaohuiS merged 2 commits intosonic-net:masterfrom
ZhaohuiS merged 2 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
StormLiangMS
reviewed
Jan 9, 2023
| unexpected_count += 1 | ||
| else: | ||
| expected_count += 1 | ||
| logging.info("The count of expected to receive packets: {}, unexpected count: {}.".format(expected_count, unexpected_count)) |
Collaborator
There was a problem hiding this comment.
Is the count here pkts counts? @ZhaohuiS, from code, looks like it is the count how many times send PACKET_COUNT pkts. If so, the log is confusing.
Contributor
Author
There was a problem hiding this comment.
@StormLiangMS It counts the number of expected scenarios, not the received packet number, I update the comment.
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
lipxu
approved these changes
Jan 9, 2023
wangxin
pushed a commit
that referenced
this pull request
Jan 10, 2023
What is the motivation for this PR? In nightly test, for test_tunnel_memory_leak case, it will send 1000 packets for every server port and will check if every port receives packets. Sometimes, unstable test environment always fails the case, especially for dualtor-120, even one server can't receive packets, the case will fail. But this case's purpose is to check if there is memory leak for tunnel_packet_handler. Loose the pass condition for this case, if memory check fail, this case will fail, add debug info for unreceived scenarios for further check. How did you do it? Catch exception if doesn't receive expected packets. Count expected and unexpected number. How did you verify/test it? Run dualtor/test_tunnel_memory_leak.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
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.
Signed-off-by: Zhaohui Sun zhaohuisun@microsoft.com
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In nightly test, for
test_tunnel_memory_leakcase, it will send 1000 packets for every server port and will check if every port receives packets. Sometimes, unstable test environment always fails the case, especially for dualtor-120, even one server can't receive packets, the case will fail.But this case's purpose is to check if there is memory leak for
tunnel_packet_handler.Loose the pass condition for this case, if memory check fail, this case will fail, add debug info for unreceived scenarios for further check.
How did you do it?
Catch exception if doesn't receive expected packets.
Count expected and unexpected number.
How did you verify/test it?
Run
dualtor/test_tunnel_memory_leak.py.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation