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 cellular dns test with IAR compiled binary #11220

Merged
merged 3 commits into from Aug 22, 2019

Conversation

@jarvte
Copy link
Contributor

commented Aug 14, 2019

Description

Binary compiled with IAR crashes when trying to print null string. Fixed to print 'null' when the dns test is trying to print an empty ip address.
Fixed also that there should not be an empty ip address after connect. After fix, still some modems don't give an ip address even they have it. This can't be fixed but network communication works properly.

Pull request type

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

Reviewers

@kivaisan @kimlep01

Test case printed IP address. If ip address is null, IAR compiled binary fails.
Added check for printing null. If IP address is null, then it prints string 'null'.
@jarvte jarvte force-pushed the jarvte:fix_cellular_dns_test branch from 84bb815 to 2ebc648 Aug 14, 2019
@ciarmcom ciarmcom requested review from kimlep01, kivaisan and ARMmbed/mbed-os-maintainers Aug 14, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

// no IPV4 address, return
return NULL;
}
len = _at.read_string(_ip, NSAPI_IPv4_SIZE);

This comment has been minimized.

Copy link
@AriParkkila

AriParkkila Aug 14, 2019

Contributor

PDP_IPV6_SIZE

This comment has been minimized.

Copy link
@jarvte

jarvte Aug 14, 2019

Author Contributor

true, fixed

// in case stack type is not IPV4 only, try to look also for IPV6 address
if (_stack_type != IPV4_STACK) {
if (len != -1 && _stack_type != IPV4_STACK) {
// in case stack type is not IPV4 only, try to look also for IPV6 address
(void)_at.read_string(_ip, PDP_IPV6_SIZE);

This comment has been minimized.

Copy link
@jarvte

jarvte Aug 14, 2019

Author Contributor

no, can't do that as this is an optional value

CellularContext now tries to get an IP address after connect and before
sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from
the modem we will send NSAPI_STATUS_GLOBAL_UP and return success.
Modem has an ip address but for some reason some modems don't
give it to us.
@jarvte jarvte force-pushed the jarvte:fix_cellular_dns_test branch from 2ebc648 to 6a17d74 Aug 14, 2019
// in case stack type is not IPV4 only, try to look also for IPV6 address
if (_stack_type != IPV4_STACK) {
if (len != -1 && _stack_type != IPV4_STACK) {
// in case stack type is not IPV4 only, try to look also for IPV6 address
(void)_at.read_string(_ip, PDP_IPV6_SIZE);

This comment has been minimized.

Copy link
@jarvte

jarvte Aug 14, 2019

Author Contributor

no, can't do that as this is an optional value

Test case printed IP address. If ip address is null, IAR compiled binary fails.
Added check for printing null. If IP address is null, then it prints string 'null'.
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 21, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_cloud-client-test
@adbridge

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 21, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Aug 22, 2019
@0xc0170 0xc0170 merged commit 5c09ff1 into ARMmbed:master Aug 22, 2019
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test 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
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8652 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@adbridge

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

Sitting on top of 5.14 changes so targeting for 5.14 now instead

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