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

Publish tests documentation for DNS, Emac, NetworkInterface and Wifi #9630

Merged
merged 4 commits into from
Feb 12, 2019

Conversation

michalpasztamobica
Copy link
Contributor

Description

Documentation moved from internal Confluence pages.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[x] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@SeppoTakalo
@VeijoPesonen
@KariHaapalehto
@mtomczykmobica
@tymoteuszblochmobica
@kjbracey-arm

@ciarmcom
Copy link
Member

ciarmcom commented Feb 6, 2019

@michalpasztamobica, thank you for your changes.
@tymoteuszblochmobica @kjbracey-arm @VeijoPesonen @SeppoTakalo @KariHaapalehto @mtomczykmobica @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-test @ARMmbed/mbed-os-maintainers please review.

@NirSonnenschein NirSonnenschein requested a review from a team February 6, 2019 12:44
@@ -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
Copy link
Contributor

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

Copy link
Contributor

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.

Test environment
----------------

- [Greentea](https://github.com/ARMmbed/greentea)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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"

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

Choose a reason for hiding this comment

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

Does not render properly


**Preconditions:**

1. -
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks bad.


This test case is to test whether the driver accepts valid credentials and reject ones that are not valid.

**�Preconditions:**
Copy link
Contributor

Choose a reason for hiding this comment

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

Does not render correctly.

@VeijoPesonen
Copy link
Contributor

@melwee01 would you also like to take a look if you have time?

----------------

- Mbed OS.
- Standard Mbed OS development tools as described in https://os.mbed.com/docs/latest/tools/index.html.
Copy link
Contributor

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

@michalpasztamobica
Copy link
Contributor Author

Thanks for your feedback, @VeijoPesonen . Alle remarks fixed.
Is there some smart way to see the rendered output of the modified files? I am locally using a Chrome "Markdown Preview Plus" plugin, but I can see it renders differently from github. I am especially worried about the tables...

Copy link
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

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

Small changes requested.

@@ -1678,3 +1693,308 @@ Subset for driver test
### For socket layer driver (AT-driven, external IP stack):

All Socket, UDPSocket, TCPSocket and TLSSocket testcases.

Copy link
Contributor

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.

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

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.

Test environment
----------------

- [Greentea](https://github.com/ARMmbed/greentea)
Copy link
Contributor

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"

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

Choose a reason for hiding this comment

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

secruity change to security


**Preconditions:**

1. -
Copy link
Contributor

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.

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

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.

First call should return zero, second call should return negative number between -10 and -100.

**
**
Copy link
Contributor

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...

Copy link
Contributor Author

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...

`scan()` returns positive number that is higher or equivalent of two. (>=2).

**
**
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these extra markings.

@michalpasztamobica
Copy link
Contributor Author

Thanks, @SeppoTakalo , remarks fixed.

@SeppoTakalo
Copy link
Contributor

Not all remarks..

Change the order like I proposed earlier..

First DNS testcases, then "Subset for driver ...."


**Expected result:**

| Parameters | | | Expected return code |
Copy link
Contributor

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.

@michalpasztamobica
Copy link
Contributor Author

I hope now I got it right...
This...

### For socket layer driver (AT-driven, external IP stack):

All Socket, UDPSocket, TCPSocket and TLSSocket testcases.

... 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?

@SeppoTakalo
Copy link
Contributor

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.

@VeijoPesonen
Copy link
Contributor

Thanks for your feedback, @VeijoPesonen . Alle remarks fixed.
Is there some smart way to see the rendered output of the modified files? I am locally using a Chrome "Markdown Preview Plus" plugin, but I can see it renders differently from github. I am especially worried about the tables...

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

@VeijoPesonen VeijoPesonen Feb 6, 2019

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.
Amanda Butler added 2 commits February 7, 2019 15:52
Edit file, mostly for inclusion of articles.
Edit file, mostly for inclusion of articles.
@VeijoPesonen
Copy link
Contributor

Thanks @michalpasztamobica and @AnotherButler.

@SeppoTakalo
Copy link
Contributor

SeppoTakalo commented Feb 8, 2019

I would be happy to use a template that says **Preconditions:** as there can be zero or more conditions.

Does not much change the message if we tailor the template per test case for titles to be plural or singular.

@michalpasztamobica
Copy link
Contributor Author

@0xc0170 , is there any other approval required here? @ARMmbed/mbed-docs ?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2019

Yes, @AnotherButler to approve. I can schedule CI now as it was already edited by docs team

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2019

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2019

Just to confirm, this update is targetting 5.11.x ?

@michalpasztamobica
Copy link
Contributor Author

Not sure. @SeppoTakalo , @TuomoHautamaki , can you help us here? Should this documentation publishing go into 5.11.x?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2019

CI completed, waiting for docs to approve and ready for merge

@SeppoTakalo
Copy link
Contributor

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.

@cmonr cmonr merged commit 799476d into ARMmbed:master Feb 12, 2019
@adbridge
Copy link
Contributor

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

@SeppoTakalo SeppoTakalo deleted the publish_documentation branch February 12, 2019 15:15
Copy link
Contributor

@AnotherButler AnotherButler left a 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.
Copy link
Contributor

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

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

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

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

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

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

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

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

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

Choose a reason for hiding this comment

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

"requests"

@cmonr
Copy link
Contributor

cmonr commented Feb 12, 2019

@SeppoTakalo @michalpasztamobica @ARMmbed/mbed-os-ipcore Would someone mind following up with the above suggested doc edits in a new PR?

@michalpasztamobica
Copy link
Contributor Author

michalpasztamobica commented Feb 13, 2019

@AnotherButler , many thanks for your thorough review. I hope I addressed all remarks in #9698.

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

8 participants