Skip to content
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

packetdrill: implement relative time tolerance #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sheepx86
Copy link

Packetdrill tries to accommodate difference between expected time and observed time using a (configurable) maximum value of the difference.

For tests runing on slow hosts or with long running tests, the fixed tolerance may cause the test fail.

Add a new flag --tolerance_percent to allow the tolerance relative to the time difference of events. Default of 0.5 % means that 5ms of drift per second is allowed. The flag also applies to SCM_TIMESTAMPING records.

Copy link
Contributor

@wdebruij wdebruij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please clean up the commit message for this commit?

@sheepx86 sheepx86 changed the title packetdrill : implement relative time tolerance packetdrill: implement relative time tolerance Aug 13, 2020
Eric Dumazet and others added 3 commits August 13, 2020 10:06
packetdrill tries to accommodate difference between expected time
and observed time using a (configurable) maximum value of the difference.

Add a percentage based tolerance, which is helpful for long running tests.

Default of 0.5 % means that 5ms of drift per second is allowed.
If one event happens 10 seconds after the last one, the tolerance would be 50 ms.

Can be changed with --tolerance_percent=<percentage>
Packetdrill calculates the dynamic tolerance based on delta between time
of the last and current event. This delta value is irrelevant for a
blocking system call and the last event is unpredictable and depends
on the timing. Instead we can use the delta between the start and end
time specified in the packetdrill with an ellipse.
Packetdrill checks difference between expected time and observed time
using a tolerance, which is set as the higher of a fixed value
(tolerance_usecs) or a percentage(tolerance_percent) times duration.

Extend this check for SCM_TIMESTAMPING records.
Copy link
Contributor

@wdebruij wdebruij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jian!

dcaratti pushed a commit to dcaratti/packetdrill that referenced this pull request Feb 25, 2021
mptcp: new syscall test for full DATA_FIN handshake after close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants