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 for configurable network driver tests #5335

Merged
merged 4 commits into from Nov 16, 2017

Conversation

Projects
None yet
10 participants
@yennster
Contributor

yennster commented Oct 17, 2017

Description

This change fixes a bug with @sarahmarshy's configurable network driver tests. These tests can be invoked with an existing interface inside mbed OS or a new NSAPI implementation via:

mbed test -m [MCU] -t gcc_arm -n mbed-os-tests-netsocket* --test-config ethernet
or
mbed test -m [MCU] -t gcc_arm -n mbed-os-tests-netsocket* --test-config path\to\config\file

Bug fixed allows for any board with LWIP (not just K64F or Odin) to run mbed OS network tests. Also fixed a comment that describes what the get_test_config function returns.

Edit:
Also, mbed test -m [MCU] -t gcc_arm -n mbed-os-tests-netsocket* will by default choose the Ethernet interface for any target with LWIP.

Related PRs

branch PR
mbed-os/master Add configurable network driver tests #4795

@sarahmarshy @theotherjimmy

@sarahmarshy sarahmarshy referenced this pull request Oct 17, 2017

Merged

Add configurable network driver tests #4795

3 of 3 tasks complete
@theotherjimmy

This is great! I have just left some nits below.

tools/test_configs/__init__.py Outdated
@@ -10,7 +11,10 @@ def get_valid_configs(target_name):
if target_name in TARGET_CONFIGS:
target_config = TARGET_CONFIGS[target_name]
else:
return {}
if 'LWIP' in TARGET_MAP[target_name].features:

This comment has been minimized.

@theotherjimmy

theotherjimmy Oct 17, 2017

Contributor

Can this be an elif instead? that would make the code a smidgen easier to follow.

tools/test_configs/__init__.py Outdated
@@ -31,5 +35,11 @@ def get_default_config(target_name):
if config_name == "NONE":
return None
return join(CONFIG_DIR, CONFIG_MAP[config_name])
elif target_name in TARGET_MAP:
if 'LWIP' in TARGET_MAP[target_name].features:

This comment has been minimized.

@theotherjimmy

theotherjimmy Oct 17, 2017

Contributor

Since the else following both the elif above and the if here have the same behavior, could this if be folded into the elif? for example:

elif (target_name in TARGET_MAP and 
      'LWIP' in TARGET_MAP[target_name].features):
    return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
@yennster

This comment has been minimized.

Contributor

yennster commented Oct 17, 2017

@theotherjimmy Made those changes 😄

@theotherjimmy

Looks great!

@sarahmarshy

This comment has been minimized.

Contributor

sarahmarshy commented Oct 17, 2017

@yennster - Can you go ahead and remove the special case for K64F - https://github.com/ARMmbed/mbed-os/blob/master/tools/test_configs/target_configs.json#L6-L8

@geky

geky approved these changes Oct 17, 2017

@yennster

This comment has been minimized.

Contributor

yennster commented Oct 17, 2017

@sarahmarshy done 👍

@geky

This comment has been minimized.

Member

geky commented Oct 17, 2017

@theotherjimmy, this needs to go in before any other network prs. Currently network tests are only running for K64F in CI. @yennster nice fix 👍

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 17, 2017

Thanks for the notification @geky. @adbridge @0xc0170 Be aware of the comment above.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 17, 2017

@studavekar You also needed to know about the priority here, but it looks like you were paying close attention anyway. 😄

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 17, 2017

Build : SUCCESS

Build number : 206
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5335/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci

This comment has been minimized.

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Oct 17, 2017

There is one failure for ARCH_PRO + IAR : tests-netsocket-socket_sigio log link

[1508277422.98][CONN][RXD] Operator new[] out of memory
@yennster

This comment has been minimized.

Contributor

yennster commented Oct 17, 2017

@studavekar The fix for the tests-netsocket-socket_sigio test should come in a separate PR

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 17, 2017

Build : SUCCESS

Build number : 214
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5335/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 18, 2017

@studavekar The fix for the tests-netsocket-socket_sigio test should come in a separate PR

This is then blocked on proceeding fix. I'll label it as such.

@yennster @sarahmarshy Can you fix tests-netsocket-socket_sigio ? I haven't spotted it in the patches.

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 18, 2017

OK, ethernet becomes the default configuration,
but this makes "echo-server-addr" default value to 195.34.89.241 which is OK maybe only in ARM network...?

@yennster

This comment has been minimized.

Contributor

yennster commented Oct 20, 2017

@0xc0170 Sorry for the delay, I am looking into the tests-netsocket-socket_sigio test for arch_pro now

@yennster

This comment has been minimized.

Contributor

yennster commented Oct 20, 2017

@0xc0170 Unfortunately, I cannot find another arch_pro board in the office to replicate the failure locally, I look around again on Tuesday

@adbridge

This comment has been minimized.

Contributor

adbridge commented Oct 24, 2017

I take it #4795 was the preceding PR for this one (which has now been merged) ?

@yennster

This comment has been minimized.

Contributor

yennster commented Oct 24, 2017

@adbridge Yeah, #4795 has already been merged

@adbridge

This comment has been minimized.

Contributor

adbridge commented Oct 26, 2017

/morph test

@mbed-ci

This comment has been minimized.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Nov 13, 2017

@yennster Could you rebase this PR to resolve the conflicts?

@kegilbert kegilbert force-pushed the yennster:test-configs-update branch Nov 13, 2017

@kegilbert kegilbert force-pushed the yennster:test-configs-update branch to fbdd019 Nov 13, 2017

@kegilbert

This comment has been minimized.

Contributor

kegilbert commented Nov 13, 2017

@theotherjimmy Rebased against master.

@kegilbert

This comment has been minimized.

Contributor

kegilbert commented Nov 15, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 15, 2017

Build : SUCCESS

Build number : 529
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5335/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@sarahmarshy

This comment has been minimized.

Contributor

sarahmarshy commented Nov 16, 2017

@jeromecoutant, these issues are unrelated to this PR. Can you please file an issue for your concerns?

@kegilbert

This comment has been minimized.

Contributor

kegilbert commented Nov 16, 2017

@theotherjimmy Is this good to go in?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Nov 16, 2017

Probably? @geky Could you give this a quick re-review? There are a few commits since your last review.

@geky

geky approved these changes Nov 16, 2017

I don't really follow much of the tools development, but the checkmark's green and the tests are passing so

LGTM!

@theotherjimmy theotherjimmy merged commit 6720bfd into ARMmbed:master Nov 16, 2017

6 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Nov 21, 2017

Hi
Please check #5543, we can not execute tests from ci-test-shield anymore
Thx

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Nov 24, 2017

@jeromecoutant, these issues are unrelated to this PR. Can you please file an issue for your concerns?

Please check #5576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment