-
Notifications
You must be signed in to change notification settings - Fork 3k
Add greentea tests for network interface status and connect/disconnect #7882
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
Conversation
Added tests: NETWORKINTERFACE_STATUS NETWORKINTERFACE_STATUS_NONBLOCK NETWORKINTERFACE_STATUS_GET NETWORKINTERFACE_CONN_DISC_REPEAT
/* | ||
* Test cases | ||
*/ | ||
void NETWORKINTERFACE_STATUS(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these in capital letters? I assumed these are macros that somehow get overwritten somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the naming convention for our socket and network tests. Test case names are in capital letters. Used in socket and dns tests already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, older tests not using that yet. @SeppoTakalo should we update also those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the exact same name as test plan has.
- Test Plan https://github.com/ARMmbed/mbed-os/blob/0bb791ed0d1685b752712e652bd17e94895e3432/TESTS/netsocket/README.md
- https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/tcp/tcp_tests.h
- https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/udp/udp_tests.h
- https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/dns/dns_tests.h
Test cases are anyway a bit special, so having exception to common API guidelines is acceptable.
Having testcases in small letters has a added benefit that it is clearly visible separation from test suite (binary name)
10:18:17 mbedgt: test suite 'mbed-os-tests-netsocket-dns' ..................................................... OK in 72.73 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS' ................................................................ OK in 0.11 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_CACHE' .......................................................... OK in 0.33 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_CANCEL' ......................................................... OK in 5.34 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE' ........................................... OK in 2.60 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_INVALID_HOST' ................................................... OK in 0.66 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC' ............................................ OK in 0.56 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_SIMULTANEOUS' ................................................... OK in 0.55 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE' ............................................. OK in 0.55 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT' ............................................ OK in 28.41 sec
10:18:17 test case: 'ASYNCHRONOUS_DNS_TIMEOUTS' ....................................................... OK in 2.39 sec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0xc0170 I think we would be changing the emac/wifi tests to match socket/dns tests in an another pull requests. Can this pull request proceed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, entering needs: CI now.
Test cases are anyway a bit special, so having exception to common API guidelines is acceptable.
It would be (I would still challenge we are entering the ground where preprocessor can replace it and leads to failures. I would avoid naming anything else with capital letters but macros) but this is not the case for test cases for our tests. I found this only in these tests not anywhere else so do not see why it would be different (we can update the test plan to match the implementation). If this is something up for the change, should be documented (test cases are upper case because..) and followed?
cc @ARMmbed/mbed-os-test
/morph build |
Build : SUCCESSBuild number : 3095 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2704 |
Test : SUCCESSBuild number : 2884 |
Description
Added following network interface status and connect/disconnect greentea tests:
NETWORKINTERFACE_STATUS
NETWORKINTERFACE_STATUS_NONBLOCK
NETWORKINTERFACE_STATUS_GET
NETWORKINTERFACE_CONN_DISC_REPEAT
Pull request type