-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Publish tests documentation for DNS, Emac, NetworkInterface and Wifi #9630
Publish tests documentation for DNS, Emac, NetworkInterface and Wifi #9630
Conversation
@michalpasztamobica, thank you for your changes. |
TESTS/netsocket/README.md
Outdated
@@ -18,6 +18,7 @@ The target for this plan is to test: | |||
- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/UDPSocket.h). | |||
- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.h). | |||
- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TLSSocket.h). | |||
- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/DNS.h) | |||
|
|||
Reference documentation: https://os.mbed.com/docs/latest/reference/network-socket.html |
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.
OK, not part of your changes but I guess this should be changed to https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html . And maybe also convert it to proper link named as "Network Socket Documentation" - or something similar
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! Please fix the link.
TESTS/network/interface/README.md
Outdated
Test environment | ||
---------------- | ||
|
||
- [Greentea](https://github.com/ARMmbed/greentea) |
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.
Superseded by https://github.com/ARMmbed/mbed-os-tools
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.
Perhaps link to this https://os.mbed.com/docs/mbed-os/v5.11/tools/greentea-testing-applications.html
Replace "v5.11" with "latest"
TESTS/network/wifi/README.md
Outdated
- Channels to be used must be different for both APs. For secure on channel number is later referred as `<ch:secure>` and for unsecure on `<ch:unsecure>` | ||
- MAC addresses of Wifi APs must be known. Later referred as `<mac:secure>` and `<mac:unsecure>` | ||
|
||
**NOTE:�**Echo server is referred here as it is a requirement for running Socket API tests. It is not directly used by test cases defined in this document. |
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.
Does not render properly
TESTS/network/wifi/README.md
Outdated
|
||
**Preconditions:** | ||
|
||
1. - |
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.
Looks bad.
TESTS/network/wifi/README.md
Outdated
|
||
This test case is to test whether the driver accepts valid credentials and reject ones that are not valid. | ||
|
||
**�Preconditions:** |
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.
Does not render correctly.
@melwee01 would you also like to take a look if you have time? |
TESTS/network/interface/README.md
Outdated
---------------- | ||
|
||
- Mbed OS. | ||
- Standard Mbed OS development tools as described in https://os.mbed.com/docs/latest/tools/index.html. |
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.
Could be turned into a proper link like on line 9
b02c36e
to
c0e7f59
Compare
Thanks for your feedback, @VeijoPesonen . Alle remarks fixed. |
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.
Small changes requested.
TESTS/netsocket/README.md
Outdated
@@ -1678,3 +1693,308 @@ Subset for driver test | |||
### For socket layer driver (AT-driven, external IP stack): | |||
|
|||
All Socket, UDPSocket, TCPSocket and TLSSocket testcases. | |||
|
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.
Move these before the "Subset for driver test" section.
Otherwise the formatting seems OK.
TESTS/netsocket/README.md
Outdated
@@ -18,6 +18,7 @@ The target for this plan is to test: | |||
- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/UDPSocket.h). | |||
- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.h). | |||
- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TLSSocket.h). | |||
- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/DNS.h) | |||
|
|||
Reference documentation: https://os.mbed.com/docs/latest/reference/network-socket.html |
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! Please fix the link.
TESTS/network/interface/README.md
Outdated
Test environment | ||
---------------- | ||
|
||
- [Greentea](https://github.com/ARMmbed/greentea) |
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.
Perhaps link to this https://os.mbed.com/docs/mbed-os/v5.11/tools/greentea-testing-applications.html
Replace "v5.11" with "latest"
TESTS/network/wifi/README.md
Outdated
| 5 | WIFI_GET_RSSI | | SHOULD | | ||
| 6 | WIFI_CONNECT_PARAMS_NULL | | MUST | | ||
| 7 | WIFI_CONNECT_PARAMS_VALID_UNSECURE | | MUST | | ||
| 8 | WIFI_CONNECT_PARAMS_VALID_SECURE | With secruity type: | | |
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.
secruity
change to security
TESTS/network/wifi/README.md
Outdated
|
||
**Preconditions:** | ||
|
||
1. - |
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.
1. -
renders to
1.
o
So use 1. none
instead.
TESTS/network/wifi/README.md
Outdated
| ssid=NULL | pass=NULL | security= NSAPI_SECURITY_NONE | NSAPI_ERROR_PARAMETER | | ||
| ssid="OK" | pass=NULL | security=NSAPI_SECURITY_WPA_WPA2 | NSAPI_ERROR_PARAMETER | | ||
| ssid="OK" | pass=NULL | security=NSAPI_SECURITY_WEP | NSAPI_ERROR_PARAMETER | | ||
| | | | because password is missing. | |
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.
These two line boxes are not rendering very well.
Just combine the content into one box, like | NSAPI_ERROR_PARAMETER because password is missing |
Markdown will then split the lines.
Or you can try <br />
HTML code to split the lines manually.
TESTS/network/wifi/README.md
Outdated
First call should return zero, second call should return negative number between -10 and -100. | ||
|
||
** | ||
** |
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.
What are these extra markings? Remove...
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.
Probably some artifacts from pandoc...
TESTS/network/wifi/README.md
Outdated
`scan()` returns positive number that is higher or equivalent of two. (>=2). | ||
|
||
** | ||
** |
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.
Remove these extra markings.
c0e7f59
to
ade4211
Compare
Thanks, @SeppoTakalo , remarks fixed. |
ade4211
to
ff81db6
Compare
Not all remarks.. Change the order like I proposed earlier.. First DNS testcases, then "Subset for driver ...." |
TESTS/network/wifi/README.md
Outdated
|
||
**Expected result:** | ||
|
||
| Parameters | | | Expected return code | |
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.
Can we change this table to
ssid | password | security | Expected return code |
---|
The we can remove those ssid=
and pass=
which fill up the table and make it harder to read.
I hope now I got it right...
... part belongs to the sockets, right? (So it should go before the DNS testcases)? Or should we add DNS to the list and move it down to the end of document? |
ff81db6
to
cf4b678
Compare
No, that part belongs to bottom of the file as it was in the Confluence. No we are just appending Socket and DNS test cases together so that it is a long list of testcases that live within this directory. Then after the testcase listing. there would be subsets proposed. |
One way is to just create a new branch to your fork and check the end result from your browser. Nothing better comes to my mind. Once the changes have already landed to a PR just use the "View File"-button. |
|
||
Reference documentation: https://os.mbed.com/docs/latest/reference/network-socket.html | ||
See [Network Socket Documentation](https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html) for reference. |
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.
Would you please do the same for the line 29.
Documentation moved from internal Confluence pages.
Edit file, mostly for inclusion of articles.
Edit file, mostly for inclusion of articles.
Thanks @michalpasztamobica and @AnotherButler. |
I would be happy to use a template that says Does not much change the message if we tailor the template per test case for titles to be plural or singular. |
@0xc0170 , is there any other approval required here? @ARMmbed/mbed-docs ? |
Yes, @AnotherButler to approve. I can schedule CI now as it was already edited by docs team |
CI started |
Just to confirm, this update is targetting 5.11.x ? |
Not sure. @SeppoTakalo , @TuomoHautamaki , can you help us here? Should this documentation publishing go into 5.11.x? |
CI completed, waiting for docs to approve and ready for merge |
It does not matter whether it goes out in 5.11 or 5.12 as we always link into the master branch. Basically I think that it can be merged in the 5.11 branch, because it describes existing test cases. But there is no code changes, so I don't see the point. |
@ARMmbed/mbed-docs Could you please still review this and mark any comments so that they can come into a follow on PR - this got prematurely merged... |
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 requested several global edits because I didn't want to paste them every time.
|
||
**Expected result:** | ||
|
||
Return value is NSAPI_ERROR_DNS_FAILURE for first, third and fifth host name. Return value is NSAPI_ERROR_OK and IP address is obtained for second and fourth host name. |
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.
Please add code formatting. I'm not sure what this means.
|
||
**Test steps:** | ||
|
||
1. Call `gethostbyname()` in a row 6 times with a different host names. Host names shall not be found from cache. First, third and fifth host name shall be invalid. |
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.
"...with different host names."
Also, I'm not sure what the rest of this line means.
|
||
**Preconditions:** | ||
|
||
1. Network interface is initialised. |
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.
"initialized"
|
||
**Description:** | ||
|
||
Verify that DNS failure error is provided for invalid hosts. Call `NetworkInterface::gethostbyname()` in a row 6 times with a different host names. First, third and fifth host name shall be invalid. |
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.
"...with different host names."
I'm not sure what the rest of this line means.
|
||
**Expected result:** | ||
|
||
Return value is NSAPI_ERROR_OK and IP address is obtained from the function call 5 times. First request shall complete slower than the requests made after it (where the response is found from cache). |
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.
Please add code formatting.
"slower" -> "more slowly".
**Test steps:** | ||
|
||
1. Call `gethostbyname_async()` in a row 6 times with a different host names. Host names shall not be found from cache. | ||
2. Verify that last `gethostbyname_async()` operation is rejected since there is room only for 5 simultaneous operations. |
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.
"since" -> "because"
|
||
**Description:** | ||
|
||
Verify that the caching of DNS results works correctly with simultaneous asynchronous DNS queries. Call `NetworkInterface::gethostbyname_async()` in a row 6 times with a different host names. Wait for all requests to complete and verify result. Cache shall contain at least one host name used in asynchronous request. This can be achieved e.g. by running test "Asynchronous DNS simultaneous" before this test and using same host names in this run. |
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.
"in asynchronous request. You can achieve this, for example, by running ..."
|
||
**Description:** | ||
|
||
Verify that non-asynchronous i.e. blocking DNS queries and asynchronous i.e. non-blocking queries work at the same time. Call `NetworkInterface::gethostbyname_async()`. Right after that make 6 non-asynchronous `NetworkInterface::gethostbyname()` calls with different host names. |
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.
"Verify nonasnchronous (in other words, blocking) DNS queries and asynchronous (in other words, nonblocking) queries ... after that, make 6 nonasynchronous..."
|
||
**Description:** | ||
|
||
Verify that asynchronous DNS query cancel works correctly. Call `NetworkInterface::gethostbyname_async()` in a row 6 times with a different host names. Cache shall contain 3 host names used in requests. This can be achieved e.g. by running test "Asynchronous DNS non-asynchronous and asynchronous" before this test and using same host names in this run. For each request that was given an unique id, call cancel. Verify that callback is not called for cancelled requests. |
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.
Please globally delete the hyphen in "nonasynchronous".
Please globally capitalize "ID".
Please globally delete the extra "l" in "canceled".
1. Call `gethostbyname_async()` in a row 6 times with a different host names. Cache shall contain in maximum 3 host names used in requests. | ||
2. Call `gethostbyname_async_cancel()` for each request that was given an unique id. | ||
3. Verify that for cancelled requests, callback is not called. | ||
4. Verify that for other request, callback is called. |
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.
"requests"
@SeppoTakalo @michalpasztamobica @ARMmbed/mbed-os-ipcore Would someone mind following up with the above suggested doc edits in a new PR? |
@AnotherButler , many thanks for your thorough review. I hope I addressed all remarks in #9698. |
Description
Documentation moved from internal Confluence pages.
Pull request type
Reviewers
@SeppoTakalo
@VeijoPesonen
@KariHaapalehto
@mtomczykmobica
@tymoteuszblochmobica
@kjbracey-arm