-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utils / network: improvements to ping_flood() #6063
Draft
clebergnu
wants to merge
5
commits into
avocado-framework:master
Choose a base branch
from
clebergnu:utils_network_interface_flood
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Utils / network: improvements to ping_flood() #6063
clebergnu
wants to merge
5
commits into
avocado-framework:master
from
clebergnu:utils_network_interface_flood
Conversation
This file contains 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
Signed-off-by: Cleber Rosa <crosa@redhat.com>
It's not possible for regular users to flood ping without a interval of less than 2 ms: ping: cannot flood, minimal interval for user must be >= 2 ms, use -i 0.002 (or higher) Given that it's a fact, let's improve the odds of this function behaving well by not causing the ping utility to simply error out in such situations. Signed-off-by: Cleber Rosa <crosa@redhat.com>
The implementation of ping_flood() counts on the output generated by the ping command line utility. But, the way and amount of data it reads looking for the failure pattern is both too small and is susceptible to timing issues. In order to minimize those possibilities, let's send error messages (which will never contain the info this function is looking for) to another file. It also allows to use that as an improvement to the log messages. Signed-off-by: Cleber Rosa <crosa@redhat.com>
The ping_flood() function is a bit delicate, and further improvements are needed. To make sure we introduce improvements and not regressions, let's add some basic functional tests. Signed-off-by: Cleber Rosa <crosa@redhat.com>
…tests We have the name of the suite, so let's give it to users when printing out a possible mismatch. Signed-off-by: Cleber Rosa <crosa@redhat.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6063 +/- ##
==========================================
+ Coverage 54.46% 54.52% +0.06%
==========================================
Files 202 202
Lines 21883 21884 +1
==========================================
+ Hits 11919 11933 +14
+ Misses 9964 9951 -13 ☔ View full report in Codecov by Sentry. |
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.
This contains a number of improvements to the
ping_flood()
utility.