-
Notifications
You must be signed in to change notification settings - Fork 3k
Add missing documentation about tls testing #11440
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
@@ -0,0 +1,31 @@ | |||
#include "tls_tests.h" |
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.
add license header please
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.
Done.
32476ef
to
da8dbca
Compare
@AnotherButler Please review |
Edit 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.
Please address my comments.
TESTS/netsocket/README.md
Outdated
1. Call `Socket::close(stack)`. | ||
1. Call `Socket::open(stack)`. | ||
1. Call `Socket::close(stack)`. | ||
1. Delete the socket. |
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.
Is there a difference between "Delete the socket" and "Destroy the socket"? We use "destroy" everywhere else.
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 think both words are correct (means the same), but for consistency we can use "destroy" everywhere.
TESTS/netsocket/README.md
Outdated
1. Call `TCPSocket::recv(<buffer>, 30);`. | ||
1. Repeat until `recv()` returns 0. | ||
1. Call `TCPSocket::close();`. | ||
1. Delete the socket. |
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.
Is there a difference between "Delete the socket" and "Destroy the socket"? We use "destroy" everywhere else.
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 think both words are correct (means the same), but for consistency we can use "destroy" everywhere.
TESTS/netsocket/README.md
Outdated
|
||
Second recv() should return zero because endpoint closed the connection. | ||
close() should return `NSAPI_ERROR_OK'. | ||
The first `recv()` returns more that zero. Something between 10 and 30 bytes (datetime string). |
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 is this saying? That is returns more than 0? That it returns between 10 and 30? Both?
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.
Changed this sequence to:
The first recv()
returns datetime string length (It is between 10 and 30 bytes)
TESTS/netsocket/README.md
Outdated
### TLSSOCKET_SEND_REPEAT | ||
|
||
**Description:** Run SOCKET_SEND_REPEATÂ for TLSSOCKET by using port number 2009. | ||
**Description:** Run `SOCKET_SEND_REPEATÂ` for TLSSOCKET by using port number 2009. |
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.
It looks like there's some weird formatting going on. Do we know what this symbol should be, or should we delete it?
TESTS/netsocket/README.md
Outdated
### TLSSOCKET_SEND_TIMEOUT | ||
|
||
**Description:** Run SOCKET_SEND_TIMEOUTÂ for TLSSOCKET by using port number 2009. | ||
**Description:** Run `SOCKET_SEND_TIMEOUTÂ` for TLSSOCKET by using port number 2009. |
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.
It looks like there's some weird formatting going on. Do we know what this symbol should be, or should we delete it?
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.
Sorry but i don't know that. I propose to leave your changes.
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.
should be SOCKET_SEND_TIMEOUT
, lets remove the last char
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, you're right. I've removed it.
TESTS/netsocket/README.md
Outdated
### TLSSOCKET_ECHOTEST | ||
|
||
**Description:** Run SOCKET_ECHOTESTÂ for TLSSOCKET by using port number 2007. | ||
**Description:** Run `SOCKET_ECHOTESTÂ` for TLSSOCKET by using port number 2007. |
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.
It looks like there's some weird formatting going on. Do we know what this symbol should be, or should we delete it?
TESTS/netsocket/README.md
Outdated
### TLSSOCKET_ECHOTEST_NONBLOCK | ||
|
||
**Description:** Run SOCKET_ECHOTEST_NONBLOCKÂ for TLSSOCKET by using port number 2007. | ||
**Description:** Run `SOCKET_ECHOTEST_NONBLOCKÂ` for TLSSOCKET by using port number 2007. |
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.
It looks like there's some weird formatting going on. Do we know what this symbol should be, or should we delete it?
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.
Sorry but i don't know that. I propose to leave your changes.
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.
Similar to above, the last char should be deleted
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, you're right. I've removed it.
TESTS/netsocket/README.md
Outdated
**Description:** | ||
|
||
Run TCPSOCKET_RECV_TIMEOUTÂ for TLSSOCKET by using port number 2007. | ||
Run `TCPSOCKET_RECV_TIMEOUTÂ` for TLSSOCKET by using port number 2007. |
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.
It looks like there's some weird formatting going on. Do we know what this symbol should be, or should we delete it?
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.
All changes after review added.
69edacc
to
9f6ee48
Compare
TESTS/netsocket/README.md
Outdated
`Socket::open()` should first return `NSAPI_ERROR_OK` and second call `NSAPI_ERROR_PARAMETER`. | ||
|
||
|
||
`Socket::open()` first returns `NSAPI_ERROR_OK` and then calls `NSAPI_ERROR_PARAMETER`. |
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 now incorrect. Both NSAPI_ERROR_OK
and NSAPI_ERROR_PARAMETER
are return values that Socket::open()
can return.
When Socket::open()
is first called, it returns NSAPI_ERROR_OK
, when Socket::open()
is called second time, it returns NSAPI_ERROR_PARAMETER
.
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.
Fixed that by change to more detailed description:
first call (socket was not opened) returns NSAPI_ERROR_OK
and nexts calls (socet was opened by previous call Socket::open()) return NSAPI_ERROR_PARAMETER
.
TESTS/netsocket/README.md
Outdated
**Description:** | ||
|
||
Call `Socket::open()` followed by `Socket::close()` and then again `Socket::open()`. Should allow you to reuse the same object. | ||
Call `Socket::open()` followed by `Socket::close()` and then again `Socket::open()`. This allows you to reuse the same object. |
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 think it should stay in the form Should allow
as we are testing at it is allowed.
Stack SHOULD allow us to do it, but it may fail to do so.
We are not the ones who have enabled, therefore this allows
is a bit incorrect statement.
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.
Back to previous version.
9f6ee48
to
df8e3c8
Compare
CI started |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
Description
In mbed-os/TESTS/netsocket/README.md we have example of setup test server only for unsecured sockets. This changes added manual how to setup test server for tls socket version.
Pull request type
Reviewers
@SeppoTakalo
Release Notes