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

Merged
merged 4 commits into from Nov 16, 2017

Conversation

yennster
Copy link
Contributor

@yennster 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

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

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

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

@theotherjimmy Made those changes 😄

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Looks great!

@sarahmarshy
Copy link
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

@yennster
Copy link
Contributor Author

@sarahmarshy done 👍

@geky
Copy link
Contributor

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
Copy link
Contributor

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

@theotherjimmy
Copy link
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
Copy link

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
Copy link

mbed-ci commented Oct 17, 2017

@studavekar
Copy link
Contributor

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
Copy link
Contributor Author

yennster commented Oct 17, 2017

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

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Oct 18, 2017

@0xc0170
Copy link
Contributor

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
Copy link
Collaborator

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@adbridge
Copy link
Contributor

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

@yennster
Copy link
Contributor Author

@adbridge Yeah, #4795 has already been merged

@adbridge
Copy link
Contributor

/morph test

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2017

@jeromecoutant
Copy link
Collaborator

Hi
Any updates in order to make ethernet tests again with NUCLEO boards ?
Thx

@theotherjimmy
Copy link
Contributor

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

@kegilbert
Copy link
Contributor

@theotherjimmy Rebased against master.

@kegilbert
Copy link
Contributor

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Nov 15, 2017

@mbed-ci
Copy link

mbed-ci commented Nov 15, 2017

Test : SUCCESS

Build number : 335
Test logs :http://mbed-os-logs.s3-website-us-west-1.amazonaws.com/?prefix=logs/5335/335

@sarahmarshy
Copy link
Contributor

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

@kegilbert
Copy link
Contributor

@theotherjimmy Is this good to go in?

@theotherjimmy
Copy link
Contributor

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

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

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

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

LGTM!

@jeromecoutant
Copy link
Collaborator

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

@jeromecoutant
Copy link
Collaborator

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants