Commit Graph

46 Commits (e2bd0644dfd90a85e42c88f1ad83030a3a6fa12c)

Author SHA1 Message Date
kegilbert 194fa129fb Update recently added previous macro name uses in tests 2019-03-01 13:53:47 -06:00
Michal Paszta 999273f7e5 Refactor tcpsocket tests to use sigio and not to wait 2019-02-25 15:33:09 +02:00
Michal Paszta ca57bdd481 Greentea tests: user-configurable timeouts
Now it is enough to add:
    "macros": [
        "MBED_GREENTEA_TEST_XXXSOCKET_TIMEOUT_S=20"
    ],
to mbed_app.json, where XXX is on of {DNS, TLS, UDP, TCP}.
Also network-* tests are now configurable: network-interface, network-wifi, network-emac with a similar macro.
2019-02-15 15:08:15 +02:00
Ari Parkkila 56badd8616 Change TESTS/netsocket/ for cellular testing 2019-02-13 01:30:42 -08:00
Cruz Monrreal 5c4d5e346d
Merge pull request #9582 from michalpasztamobica/greentea_socket_improvements
Greentea Socket test improvements
2019-02-11 18:45:38 -06:00
Michal Paszta 99fc26ecdf Greentea Socket bind tests made ipv6-aware 2019-02-01 15:34:07 +02:00
Cruz Monrreal 2c5d246249
Merge pull request #9429 from SeppoTakalo/TCPSOCKET_endpoint_close
Fix TCPSOCKET_ENDPOINT_CLOSE: Cannot accept WOULD_BLOCK
2019-01-31 10:20:20 -06:00
Martin Kojtal 7b29593a41
Merge pull request #9415 from SeppoTakalo/ONME-4140
Allow NSAPI_ERROR_UNSUPPORTED from Socket::setsockopt()
2019-01-21 13:43:37 +01:00
Seppo Takalo 6b92d32b3e Fix TCPSOCKET_ENDPOINT_CLOSE: Cannot accept WOULD_BLOCK
This testcase uses Socket in blocking mode, and therefore
WOULD_BLOCK should not be accepted.
The logic was wrong anyway, because return value was tested
to be negative before testing with WOULD_BLOCK which is negative
as well.

Also replaced TEST_FAIL() macro with TEST_ASSERT_EQUAL() to
make the return code visible in test log.
2019-01-21 10:46:11 +02:00
Seppo Takalo 26dcd0d90a Allow NSAPI_ERROR_UNSUPPORTED from Socket::setsockopt() 2019-01-17 18:02:04 +02:00
Michal Paszta 59e8dedb67 TCP/UDP greentea tests refactoring and cleanup 2019-01-15 10:00:35 +01:00
Martin Kojtal cc89c20abc
Merge pull request #9175 from michalpasztamobica/greentea_ignore_unsupported
Greentea tests ignore bind returning UNSUPPORTED
2019-01-03 14:59:50 +00:00
Michal Paszta a2110d5411 Greentea tests ignore bind returning UNSUPPORTED 2018-12-20 15:38:07 +01:00
Seppo Takalo 18404e93be Drop MBED_EXTENTED_TESTS flagging from network tests.
All properly working IP stacks are required to pass Mbed OS socket tests.
This have now proven with current Ethernet devices with LwIP stack.
2018-12-19 16:18:33 +02:00
Kari Haapalehto e502675bd1 Fix test-netsocket-tcp greentea test build fails.
main.cpp was missing comma at the end of line.
2018-12-11 12:51:30 +02:00
Michal Paszta c48312ded4 Missing socket greentea tests implementation 2018-12-07 10:35:39 +01:00
deepikabhavnani c272377a81 Make sure no memory overhead if statistics are disabled 2018-11-26 09:42:45 -06:00
deepikabhavnani 068f2d14c0 Resolve IAR build issue
IAR not able to assign default zero value in array and complaints of
internal error as below:

[ERROR] Internal error: [Front end]: assertion failed at:
"..\..\Translator\compiler_core\src\parser\edg\decl_inits.c", line 2031
2018-11-26 09:42:45 -06:00
Deepika f6c1a40b29 Add config options for socket statistics
1. MBED_CONF_NSAPI_SOCKET_STATS_ENABLE to enable the statistics
2. MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT max sockets statistics cached
2018-11-26 09:42:45 -06:00
Deepika a851df66e3 Code/bug after testing
1. Fixing astyle and docs
2. Extra mutex lock was removed
3. Bytes are updated when send/recv > 0 and not in case of -ve error
4. Review comments
5. Guard statistics implementation in test with MBED_NW_STATS_ENABLED
2018-11-26 09:42:45 -06:00
Deepika eec54a0fc9 Update tcp test cases to verify network socket statistics
Cases Updated are:
1. TCPSOCKET_ECHOTEST_NONBLOCK
2. TCPSOCKET_OPEN_CLOSE_REPEAT
3. TCPSOCKET_OPEN_LIMIT
2018-11-26 09:42:45 -06:00
Martin Kojtal c873dc06f2 Merge branch 'ONME-3983' of https://github.com/mtomczykmobica/mbed-os into dev_rollup 2018-11-24 21:14:47 +00:00
Michal Paszta e53ee631f9 Greentea netsocket and network tests improvements
Added smarter rounding of times in recv_timeout and increased the delta by one, to allow "off-by-one" errors.
Reverted commit 88eea6a, reducing TESTS_TIMEOUT back to 480.
Introduced a 100ms timeout for waiting on asynchronous DNS resolution.
Improved error handling on disconnects.
2018-11-19 08:58:14 +01:00
Marcin Tomczyk d3812f3740 ONME-3983 Fix the defects found in IPV4 testing against packet dropping 2018-11-15 13:47:43 +01:00
Marcin Tomczyk 5eabfabc51 ONME-3733 detect xinetd service pattern and generate correct pattern 2018-11-07 13:18:04 +01:00
Seppo Takalo 66a2101006 Continue Socket and WiFi tests even on test failure.
Purpose is to run full set of testcases on each run.
Testcases should contain proper cleanup handlers so that they are
independent.
2018-10-23 13:58:21 +03:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Cruz Monrreal 506dfca8d0
Merge pull request #8235 from VeijoPesonen/mbedgt-netsocket-tc-fixes
Mbedgt netsocket tc fixes
2018-10-08 10:14:52 -05:00
Veijo Pesonen c4546910d1 Increases stack size for threads used in gt netsocket tcp test cases
Stack size is insufficient for debug profile
Stack size is insufficient for NUCLEO_F401RE+IDW01M1
Please see https://github.com/ARMmbed/wifi-x-nucleo-idw01m1/issues/17
2018-09-27 09:13:11 +03:00
Veijo Pesonen b355c750a6 Makes mbedgt-netsocket cases to accept port 0 as destination 2018-09-25 09:29:53 +03:00
Veijo Pesonen 88eea6a390 Testing with ESP8266's AT firmware v1.7 takes more time 2018-09-14 12:07:19 +03:00
Veijo Pesonen 24905f5b50 Declares gt netsocket test case buffers as static
Original patch https://github.com/ARMmbed/wifi-x-nucleo-idw01m1/issues/17
2018-09-14 12:03:36 +03:00
Mika Leppänen 3f47963aff Updated greentea TCP tests to use default interface 2018-08-21 10:55:49 +03:00
Martin Kojtal e52bb68f93 tests: astyle fix
All tests should comply to our coding standard now
2018-08-03 10:23:38 +01:00
Veijo Pesonen dd6ec037d7 Makes Greentea TCP test cases to timeout less in connection errors
Made to prevent timeout if a single test case fails. The goal is that
each test case might wait only half of the remaining time reserved for
running TCP test cases.
2018-07-26 09:39:04 +03:00
Juha Ylinen 3c32b3ada7 Update Greentea netsocket and wifi tests
Increase timeout for netsocket TCP and UDP tests. Old timeout
(240 seconds) was not enough for slower devices to complete the
tests.
Accept error codes NSAPI_ERROR_CONNECTION_TIMEOUT and
NSAPI_ERROR_NO_CONNECTION when running test wifi_connect_secure_fail
2018-06-21 09:01:15 +03:00
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 491a7ea03e Fixes findings from Greentea netsocket TCP 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 4fa57e36fe Greentea TCP test cases - check all socket calls 2018-05-25 09:39:36 +03:00
Veijo Pesonen 19335741df Adds TCP test case
tcpsocket_send_repeat
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