-
Notifications
You must be signed in to change notification settings - Fork 3k
lwip: Added delay to dtls handshake test to compensate for local network #3781
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I increased the delay on my machine it worked ok. Any idea if there's a standard "dely" for this type of thing? Or should the host test resend stuff?
@@ -42,6 +43,9 @@ def handle(self): | |||
data = ''.join(map(chr, data)) | |||
sock.sendto(data, self.client_address) | |||
|
|||
# Sleep a tiny bit to compensate for local network | |||
time.sleep(0.001) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to increase this to 0.01 on my machine for this to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with @bridadan offline, looks like I had forgotten the MBED_STACK_STATS_ENABLED and MBED_HEAP_STATS_ENABLED, which cause increased delay on the device side.
The speed of packets on the local network exceeds even the speed of the ethernet hardware on some of the less powerful devices. Adding a small delay which can be expected from a real DTLS handshake prevents this condition from occuring.
5410c0f
to
64ccff3
Compare
Fixed the delay issue. As I understand there isn't a set delay in the DTLS specification, so it's basically up to the DTLS implementation to be nice to the slow devices. |
/morph test-nightly |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
The speed of packets on the local network exceeds even the speed of the ethernet hardware on some of the less powerful devices. Adding a small delay which can be expected from a real DTLS handshake prevents this condition from occuring.
Let me know if there is still problems with this test as this delay may need to be refined.
cc @bridadan, @MarceloSalazar
should resolve #3549