Skip to content

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
edumazet 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.

4 participants