Skip to content

Ethernet tests update #5576

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 5 commits into from
Dec 12, 2017
Merged

Ethernet tests update #5576

merged 5 commits into from
Dec 12, 2017

Conversation

jeromecoutant
Copy link
Collaborator

@jeromecoutant jeromecoutant commented Nov 24, 2017

Description

Some tests have been updated:

tests-netsocket-gethostbyname:

  • MBED_DNS_TEST_HOST define is replaced by MBED_CONF_APP_DNS_TEST_HOST to allow user to change host name for local tests

tests-netsocket-udp_echo:

  • UUID lines are removed as they were not used
  • If MBED_CONF_APP_ECHO_SERVER_ADDR and MBED_CONF_APP_ECHO_SERVER_PORT are not defined (default case), test is using Greentea to get server information (code before OS 5.6.1 version)

tests-netsocket-tcp_echo:

  • UUID lines are removed as they were not used
  • If MBED_CONF_APP_ECHO_SERVER_ADDR and MBED_CONF_APP_ECHO_SERVER_PORT are not defined (default case), test is using Greentea to get server information (code before OS 5.6.1 version)
  • TCP_ECHO_PREFIX is no more a mandatory feature

tests-netsocket-tcp_hello_world:

  • HTTP_SERVER_NAME and HTTP_SERVER_FILE_PATH are replaced by MBED_CONF_APP_HTTP_SERVER_NAME and MBED_CONF_APP_HTTP_SERVER_FILE_PATH to allow user to make local tests

Status

READY

@jeromecoutant
Copy link
Collaborator Author

Added update for tests-netsocket-socket_sigio,
as test was always OK even with no connection!

@jeromecoutant
Copy link
Collaborator Author

@SeppoTakalo @sarahmarshy
Any update ?
Thx

@sarahmarshy
Copy link
Contributor

I'll get to this tomorrow. I've been out on holiday, and in travelling home today. One immediate question: why did you remove part of the EthernetInterface config? That is what most targets use if they have LWIP, so you'll leave a lot undefined.

@geky can also review

@@ -122,10 +126,13 @@ void test_socket_attach() {
sock.send(buffer, strlen(buffer));
// wait for recv data
recvd.wait();

result = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

as test was always OK even with no connection!

That should not be the case -- this line will attach the get_data function. If get_data never gets called because of an incorrect implementation of sigio, this test case will time out. If get_data does get called, the success of the test depends on the getting some data from the server here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No...
With my local test env, test was always OK whereas it is not possible to connect ARM server....

@@ -10,18 +10,6 @@
"connect-statement" : {
"help" : "Must use 'net' variable name",
"value" : "((EthernetInterface *)net)->connect()"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes will cause mbed OS tests to fail. I believe this should continue to be the default test configuration file. If echo server changes are necessary, then that person should use a custom test configuration file and specify it with the --test-config option.

Copy link
Collaborator Author

@jeromecoutant jeromecoutant Nov 30, 2017

Choose a reason for hiding this comment

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

No...
Check the updates in test c files. You can keep these setting in your files, there will be no change for you.
If user doesn't want to set manually the settings and use greentea feature, it is now possible

Copy link
Contributor

@sarahmarshy sarahmarshy Nov 30, 2017

Choose a reason for hiding this comment

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

Yes. By default, LWIP targets use this file. The echo server is not set to ublox echo server in this file, nor in the cpp files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change your test setup...
Default configuration should be the basic configuration without any specific setting.
If you have a specific test environment, use a specific json configuration file.

Copy link
Contributor

Choose a reason for hiding this comment

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

By and large, the Ublox server will be accessible on a network. It is a special case that is is not accessible. We want to provide a sensible default, and it is, unless you have a special case.

MBED_DNS_TEST_HOST define is replaced by MBED_CONF_APP_DNS_TEST_HOST to allow user to change host name for local tests
UUID lines are removed as they were not used

default case:
If MBED_CONF_APP_ECHO_SERVER_ADDR and MBED_CONF_APP_ECHO_SERVER_PORT are not defined
test is using Greentea to get server information (code before OS 5.6.1 version)
UUID lines are removed as they were not used

default case:
If MBED_CONF_APP_ECHO_SERVER_ADDR and MBED_CONF_APP_ECHO_SERVER_PORT are not defined
test is using Greentea to get server information (code before OS 5.6.1 version)

TCP_ECHO_PREFIX is no more a mandatory step
HTTP_SERVER_NAME and HTTP_SERVER_FILE_PATH are replaced by
  MBED_CONF_APP_HTTP_SERVER_NAME and MBED_CONF_APP_HTTP_SERVER_FILE_PATH
  to allow user to make local tests
HTTP_SERVER_NAME and HTTP_SERVER_FILE_PATH are replaced by
  MBED_CONF_APP_HTTP_SERVER_NAME and MBED_CONF_APP_HTTP_SERVER_FILE_PATH
  to allow user to make local tests

Test on HTTP connect added as test was always OK even with no connection...
@jeromecoutant
Copy link
Collaborator Author

Hi @sarahmarshy

json files updates removed and rebase done
There should be no change in your test env, and it's OK in my local test env.

Regards

@sarahmarshy
Copy link
Contributor

/morph test

@mbed-ci
Copy link

mbed-ci commented Dec 4, 2017

@kegilbert
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Dec 4, 2017

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Dec 4, 2017

@mbed-ci
Copy link

mbed-ci commented Dec 4, 2017

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 5, 2017

Thanks @sarahmarshy , I assume you are happy with as it is now.

@SeppoTakalo Please can you review this PR

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 7, 2017

Just to be certain

/morph test

@mbed-ci
Copy link

mbed-ci commented Dec 7, 2017

Test : SUCCESS

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

@0xc0170 0xc0170 merged commit 57a5735 into ARMmbed:master Dec 12, 2017
@jeromecoutant jeromecoutant deleted the PR_IP branch December 13, 2017 08:54
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.

6 participants