Skip to content

Greentea netsocket and network tests improvements #8780

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

Merged
merged 1 commit into from
Nov 24, 2018

Conversation

michalpasztamobica
Copy link
Contributor

Description

Added smarter rounding of times in recv_timeout.
@VeijoPesonen , this is instead of just allowing an "off by one" error. Following @mtomczykmobica remark I checked that using milliseconds causes a dummy rounding of the real times:

[1542381389.86][CONN][RXD] MBED: recv() took: 143ms
[1542381389.90][CONN][RXD] MBED: recv() took: 143750us
[1542381390.54][CONN][RXD] MBED: recv() took: 100ms
[1542381390.57][CONN][RXD] MBED: recv() took: 100732us

So we thought it might be better to start with proper rounding and if that is not enough, we can introduce the "off by one" tolerance.

Reverted commit 88eea6a, reducing TESTS_TIMEOUT back to 480.

Introduced a 100ms timeout for waiting on asynchronous DNS resolution. (@VeijoPesonen , I checked that the DNS resolution takes up to 30 ms on my network, so I added some extra buffer beyond the 20 ms which you originally suggested.)

Improved error handling on disconnects.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[x] Test update
[ ] Breaking change

@michalpasztamobica
Copy link
Contributor Author

@VeijoPesonen @SeppoTakalo , please review.

@mbed-ci
Copy link

mbed-ci commented Nov 16, 2018

Test run: FAILED

Summary: 6 of 6 test jobs failed
Build number : 3
Build artifacts
Build logs

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_mbed2-build-IAR
  • jenkins-ci/mbed-os-ci_mbed2-build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_mbed2-build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM

Added smarter rounding of times in recv_timeout and increased the delta by one, to allow "off-by-one" errors.
Reverted commit 88eea6a, reducing TESTS_TIMEOUT back to 480.
Introduced a 100ms timeout for waiting on asynchronous DNS resolution.
Improved error handling on disconnects.
@michalpasztamobica
Copy link
Contributor Author

@mtomczykmobica told me that ESP8266 was the chip that was causing most trouble and indeed - the rounding is only sufficient in the first recv, but the other one always failed:

[1542614150.58][CONN][RXD] ms: 99
[1542614150.59][CONN][RXD] us: 99705
[1542614150.63][CONN][RXD] MBED: recv() took: 99705us
[1542614150.72][CONN][RXD] ms: 99
[1542614150.73][CONN][RXD] us: 99127
[1542614151.23][CONN][RXD] MBED: recv() took: 99127us

So I followed Veijo's advice and increased the delta time to allow "off-by-one" errors.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 19, 2018

@SeppoTakalo Please review

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 22, 2018

Info: This PR has been re-bundled into a new rollup PR (#8838 ).

No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged.
If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@0xc0170 0xc0170 merged commit e53ee63 into ARMmbed:master Nov 24, 2018
@0xc0170 0xc0170 removed the needs: CI label Nov 24, 2018
@cmonr cmonr removed the rollup PR label Nov 26, 2018
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.

6 participants