Skip to content

IPCore unittests improvements #11612

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 4 commits into from
Oct 14, 2019

Conversation

michalpasztamobica
Copy link
Contributor

Description

A result of a short revisit to the unittests of socket classes:

  • implemented proper InternetSocket::close() tests which asynchronously block the closing when there is an active reader or writer (using C++11's async and chrono, which were enabled recently)
  • added tests for some newly added functions (get_interface_name() etc.)
  • some more tests extensions added wherever it was reasonable and possible

Pull request type

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

Reviewers

@AnttiKauppila
@SeppoTakalo
@VeijoPesonen

Release Notes

@ciarmcom
Copy link
Member

ciarmcom commented Oct 2, 2019

@michalpasztamobica, thank you for your changes.
@AnttiKauppila @VeijoPesonen @SeppoTakalo @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@AnttiKauppila
Copy link

@ARMmbed/mbed-os-maintainers Please proceed with this

@adbridge
Copy link
Contributor

adbridge commented Oct 7, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 7, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@michalpasztamobica
Copy link
Contributor Author

I must admit I couldn't find the exact error message, I just see:

[2019-10-07T14:29:04.932Z] parallelSteps exited with error: hudson.AbortException: mbed-os-ci_unittests #4104 completed with status FAILURE (propagate: false to ignore)

And then in the faulty job I don't see any failing test...

I believe the failure is relevant, but I fail to see the rootcause...

@AnttiKauppila
Copy link

@michalpasztamobica I checked the build logs and it seems Valgrind reports a memory leak for netsocket/NetworkInterface test (TestNetworkInterface_correct_event_listener_per_interface_Test)

@michalpasztamobica
Copy link
Contributor Author

Thanks, @AnttiKauppila !
This report is valid and I think it indicates an actual memory leak within NetworkInterface class.
We dynamically allocate memory for every added listener but we do not free it in the destructor
I think it is best if I submit it in a separate PR of type "Fix".

Dominika Maziec and others added 4 commits October 14, 2019 14:22
For the following classes:
* DTLSSocket
* NetworkInterface
* TLSSocketWrapper
Close should not take place in case there is someone reading or writing to the socket.
@michalpasztamobica
Copy link
Contributor Author

I rebased on top of a memory leak fix from #11649.
CI shall be passing now.
@0xc0170 , would you please trigger the job?

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 14, 2019

We will, we are finilizing 5.14.1 jobs at the moment, will trigger asap

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 14, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 14, 2019

Test run: SUCCESS

Summary: 1 of 1 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 4611662 into ARMmbed:master Oct 14, 2019
@michalpasztamobica michalpasztamobica deleted the coverage_gaps_unitests branch October 14, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants