Skip to content

Allow NSAPI_ERROR_UNSUPPORTED from Socket::setsockopt() #9415

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
Jan 21, 2019

Conversation

SeppoTakalo
Copy link
Contributor

Description

Test case TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID currently expects sock.setsockopt(NSAPI_SOCKET, NSAPI_KEEPALIVE, &seconds, sizeof(int)) to work.

This might not be true for all stacks, and documentation allows NSAPI_ERROR_UNSUPPORTED to be returned.

Fixed the testcase.

Pull request type

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

Reviewers

@jeromecoutant

return;
}

TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, ret);
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.connect(MBED_CONF_APP_ECHO_SERVER_ADDR, 9));
// LWIP stack does not support getsockopt so the part below is commented out
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the getsockopt test part can be implemented in the same way ?
(instead of commenting lines...)

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| DISCO_L475VG_IOT01A-ARM | DISCO_L475VG_IOT01A | tests-netsocket-tcp | TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID | 1 | 0 | OK | 0.09 |

@ciarmcom ciarmcom requested a review from a team January 17, 2019 18:00
@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested review from a team January 17, 2019 18:00
@cmonr
Copy link
Contributor

cmonr commented Jan 18, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 19, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 7b29593 into ARMmbed:master Jan 21, 2019
@SeppoTakalo SeppoTakalo deleted the ONME-4140 branch January 21, 2019 13:14
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.

7 participants