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

Fix TCPSOCKET_ENDPOINT_CLOSE: Cannot accept WOULD_BLOCK #9429

Merged
merged 1 commit into from Jan 31, 2019

Conversation

Projects
None yet
7 participants
@SeppoTakalo
Copy link
Contributor

SeppoTakalo commented Jan 18, 2019

Description

This testcase uses Socket in blocking mode, and therefore
WOULD_BLOCK should not be accepted.
The logic was wrong anyway, because return value was tested
to be negative before testing with WOULD_BLOCK which is negative
as well.

Also replaced TEST_FAIL() macro with TEST_ASSERT_EQUAL() to
make the return code visible in test log.

Pull request type

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

Reviewers

@VeijoPesonen @KariHaapalehto

Show resolved Hide resolved TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp Outdated

@ciarmcom ciarmcom requested review from KariHaapalehto , VeijoPesonen and ARMmbed/mbed-os-maintainers Jan 18, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Jan 18, 2019

Fix TCPSOCKET_ENDPOINT_CLOSE: Cannot accept WOULD_BLOCK
This testcase uses Socket in blocking mode, and therefore
WOULD_BLOCK should not be accepted.
The logic was wrong anyway, because return value was tested
to be negative before testing with WOULD_BLOCK which is negative
as well.

Also replaced TEST_FAIL() macro with TEST_ASSERT_EQUAL() to
make the return code visible in test log.

@SeppoTakalo SeppoTakalo force-pushed the SeppoTakalo:TCPSOCKET_endpoint_close branch to 6b92d32 Jan 21, 2019

@SeppoTakalo

This comment has been minimized.

Copy link
Contributor Author

SeppoTakalo commented Jan 29, 2019

@cmonr

cmonr approved these changes Jan 30, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Jan 31, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Jan 31, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jan 31, 2019

@cmonr cmonr merged commit 2c5d246 into ARMmbed:master Jan 31, 2019

21 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10564 cycles (+1555 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.