Commit Graph

36 Commits (093a6066c270824005cf24d6f790447613e11316)

Author SHA1 Message Date
Mika Leppänen 35f064fc69 Changed TCP socket test to use shared buffers
Changed RX and TX buffers used in TCP socket tests to global variables
to conserve memory.
2018-06-04 13:51:32 +03:00
Veijo Pesonen 3e6bc32df6 Makes UDPSOCKET_SENDTO_INVALID part of the netsocket extended test set 2018-05-30 12:17:53 +03:00
Veijo Pesonen 491a7ea03e Fixes findings from Greentea netsocket TCP test cases 2018-05-25 09:39:36 +03:00
Veijo Pesonen 3e11a3e666 Fixes findings from Greentea netsocket UDP test cases 2018-05-25 09:39:36 +03:00
Veijo Pesonen 21ec972798 Switches Greentea netsocket test case naming convention
From lowercase to uppercase and drops 'test_'-prefix. Test case
descriptions do also match to TC names now.

Additionally all the TCs are not behing MBED_EXTENDED_TESTS
anymore.
2018-05-25 09:39:36 +03:00
Veijo Pesonen 1b041721a0 Fixes Greentea UDP test cases
udpsocket_echotest.cpp
	udpsocket_echotest_burst.cpp
2018-05-25 09:39:36 +03:00
Veijo Pesonen 4fa57e36fe Greentea TCP test cases - check all socket calls 2018-05-25 09:39:36 +03:00
Veijo Pesonen 1fef1602a2 Adds UDP Greentea test cases
udpsocket_echotest
	udpsocket_echotest_nonblock
2018-05-25 09:39:36 +03:00
Veijo Pesonen a2f5ffa752 Adds UDP Greentea test case
udpsocket_sendto_repeat
2018-05-25 09:39:35 +03:00
Veijo Pesonen 19335741df Adds TCP test case
tcpsocket_send_repeat
2018-05-25 09:39:35 +03:00
Veijo Pesonen 096ed1e451 Adds UDP Greentea test case
udpsocket_sendto_invalid
2018-05-25 09:39:35 +03:00
Veijo Pesonen 420459b8de Removes obsolete TCP and UDP Greentea test cases 2018-05-25 09:39:35 +03:00
Veijo Pesonen aee6b06e0c Adds TCP test case
tcpsocket_echotest
	tcpsocket_echotest_nonblock
2018-05-25 09:38:23 +03:00
Veijo Pesonen df825cb3f9 Adds TCP test case
tcpsocket_connect_invalid
2018-05-25 09:38:23 +03:00
Veijo Pesonen 38b8865bcc Adds TCP and UDP test cases
tcpsocket_open_close_repeat
	udpsocket_open_close_repeat
2018-05-25 09:35:14 +03:00
Veijo Pesonen c86bf1acd0 Adds more TCP and UDP test cases
Adds TCP and UDP test cases

        tcpsocket_open_limit
        udpsocket_open_limit
2018-05-25 09:35:14 +03:00
Veijo Pesonen f04f7c1773 Starts adding more TCP and UDP performance tests
Starts splitting Greentea test suites to TCP and UDP suites and adds
more test cases like

	tcpsocket_echotest_burst
	tcpsocket_echotest_burst_nonblock
	tcpsocket_endpoint_close
	tcpsocket_recv_100k
	tcpsocket_recv_100k
	tcpsocket_recv_timeout
	tcpsocket_send_timeout
	tcpsocket_thread_per_socket_safety
	udpsocket_echotest_burst
	udpsocket_echotest_burst_nonblock
	udpsocket_recv_timeout
	udpsocket_sendto_timeout
2018-05-25 09:35:14 +03:00
Veijo Pesonen 2f410b0ce2 Rely on ARM's and U-Blox's echo servers
Make the server as default. Use the hostnames instead of plain IP addresses.
2018-05-25 09:35:14 +03:00
Kevin Bracey f584ac3b59 Connectivity test: don't create interface object twice 2018-05-23 12:24:00 +03:00
Brendan McDonnell c4f10aafee typos 2018-02-20 20:11:19 -05:00
jeromecoutant d25d457652 NETSOCKET pressure tests configuration 2018-02-14 15:18:07 +01:00
Wolfgang Betz d6cb3853df Enlarge event queue in `test_socket_attach()` 2018-02-07 13:40:50 +01:00
Wolfgang Betz 8ec9f6b430 Correct test `socket_sigio`
A call to

    `TCPSocket::recv(void *data, nsapi_size_t size)`

returns, following the mbed documentation, the number of received bytes on
success, and a negative error code on failure.

So in case of success, the return value depends on both the value of parameter
`size` but also on the amount of data already available. This means, that the
value returned can be lower than or equal to the `size` of the `data` buffer
passed as argument to the call.

Therefore, in the cases of `test_tcp_hello_world()` & `find_substring()`
(i.e. test `socket_sigio`), the calls to `TCPSocket::recv()` might return from
one byte up to `sizeof(buffer) - 1` (i.e. 511) bytes for each single call,
while the tests expect to receive the whole response string with a single call.

This commit applies a fix to this situation by implementing a receive loop
which exits once there is no data anymore available to be read from the socket.
2018-02-02 10:29:46 +01:00
Senthil Ramakrishnan d82566cc6b Fix tcp_hello_world test to receive all the data from http response 2018-01-08 14:18:06 -06:00
Senthil Ramakrishnan 47390e62d6 ESP8266 test config and tcp_echo test fix for ESP8266 2018-01-08 14:18:06 -06:00
jeromecoutant d8cc5a3850 tests-netsocket-socket_sigio
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...
2017-12-04 17:55:11 +01:00
jeromecoutant bff8fc1534 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
2017-12-04 17:55:10 +01:00
jeromecoutant df27bca67d tests-netsocket-tcp_echo
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
2017-12-04 17:55:09 +01:00
jeromecoutant 3cb8316993 tests-netsocket-udp_echo
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)
2017-12-04 17:55:08 +01:00
jeromecoutant 61b8468db9 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
2017-12-04 17:55:07 +01:00
Sarah Marsh 8c5c905d95 Limit size of equeue for sigio net test 2017-11-09 17:56:53 -06:00
Sarah Marsh fbe8dfae19 update domain name to os.mbed.com 2017-09-22 09:40:32 -05:00
Sarah Marsh 6a44ceb094 Add copyright headers and use mbed error to skip tests without network config files 2017-09-20 18:31:06 -05:00
Sarah Marsh 8f9242fe40 Add netsocket tests 2017-09-20 18:27:58 -05:00
Christopher Haster 4cad764162 Added copyright header to all tests 2017-08-07 12:02:33 -05:00
Christopher Haster 281a0e2fe1 nsapi - Added rudimentary ip parsing tests 2016-10-19 15:28:32 -05:00