Hugues Kamba
2b934a228f
Fix tests-netsocket-udp
...
Use std::chrono literals and variables where it makes sense
2020-06-18 18:10:10 +01:00
Hugues Kamba
a3f4cf212d
Use std::chrono based functions
...
The chrono based functions improve readability. Using them also removes
warnings related to usage of deprecated warnings.
2020-06-17 14:52:50 +01:00
Martin Kojtal
e3ad1cae55
Merge pull request #12334 from AriParkkila/cell-c030-r412m
...
Update cellular drivers/tests for UBLOX_C030_R412M
2020-02-05 12:50:11 +00:00
Tymoteusz Bloch
a185d6c277
UDP echotests hold in case of no memory or device busy status.
...
This gives possibility of freeing memory and mesh device recover from busy state.
2020-01-30 15:26:52 +01:00
Ari Parkkila
72281a57b3
Fix UDPSOCKET_ECHOTEST to handle oversized packets
2020-01-29 03:06:55 -08:00
Ari Parkkila
031d90a3ce
Fix UDP socket test cases
...
Fix UDP socket test cases to check more strictly on failure,
and lower trace levels to not print errors on successful cases.
2020-01-17 01:24:51 -08:00
Michal Paszta
6dfa2d78ad
Increase UDP test timeout to 1200s
...
This is because the ESP8266 is now waiting for SEND OK and takes much
more to complete the send_repeat, and echo_burst tests in RAAS.
(but has higher pass ratio).
2020-01-02 17:21:09 +02:00
Ari Parkkila
6b374804be
TESTS: Allow NSAPI_ERROR_NO_MEMORY on UDPSOCKET_ECHOTEST_BURST
2019-12-20 04:44:29 -08:00
Martin Kojtal
9cd3813282
Merge pull request #12045 from tymoteuszblochmobica/wisun
...
Netsocket test adjusted to Wisun
2019-12-19 08:23:36 +01:00
Tymoteusz Bloch
0859ff7b79
Netsocket tests timeouts and JSON and TLS configuration adjusted to pass under mesh Wisun.
...
Netsocket timeouts increased due to long node join on current Wisun implementation.
2019-12-11 17:42:29 +01:00
Kimmo Vaisanen
767c40d970
Add UDP ECHOTEST with connect/send/recv calls
...
UDPSocket can be used also similar to TCPSocket using connect(), send() and recv() methods.
This commit adds UDP ECHOTESTS which uses these methods instead of sendto() and recvfrom().
2019-12-03 13:39:50 +02:00
Michal Paszta
71db612913
Remove udpsocket_sendto_invalid
...
It tested parameter checks in the now obsoleted string-based API.
2019-11-27 20:04:47 +02:00
Michal Paszta
ea04c4f85e
Remove internal usage of deprecated APIs in IPCore
...
Updated:
* netsocket classes,
* unittests, stubs and mocks,
* greentea tests
2019-11-27 20:02:20 +02:00
Tymoteusz Bloch
983c9586ee
Adjustment of netsocket tests to the lossy mesh network limitation.
2019-11-20 12:13:34 +01:00
Martin Kojtal
2e96145b76
Merge pull request #11871 from AriParkkila/test-udpechotest-timeout
...
TESTS: Add socket.set_timeout in udpsocket_echotest
2019-11-16 07:55:53 +01:00
Chris Trowbridge
a1edbb9099
Switch to using mbed-trace for greentea test debug output
2019-11-15 11:18:13 -05:00
Ari Parkkila
ed754434b7
TESTS: Add socket.set_timeout in udpsocket_echotest
...
Some packet loss may be expected/allowed with UDP.
Set socket timeout to continue testing if no response is received within a timeout.
2019-11-14 06:04:37 -08:00
Martin Kojtal
09c24507c3
Merge pull request #11824 from rajkan01/feature-baremetal-greentea-net
...
Skip Bare Metal green tea test for Network component
2019-11-12 11:09:46 +01:00
RAJKUMAR KANAGARAJ
a682fde31c
Incorporated review comments
2019-11-11 05:01:23 -08:00
Kimmo Vaisanen
582b16ffbc
Add sender address and port verification to UDPSOCKET_ECHOTEST
...
recvfrom method returns sender address and port and this commit
adds a test for it in UDPSOCKET_ECHOTEST.
2019-11-07 14:51:20 +02:00
RAJKUMAR KANAGARAJ
c9eb48a0c5
Netsocket,lora,cellular,nework test case requires RTOS so MBED_CONF_RTOS_PRESENT guard to all test cases
2019-11-06 04:06:11 -08:00
Mirela Chirica
d2794c63c0
Cellular: Baud rate setting for UDPSOCKET_ECHOTES_BURST greentea test
2019-11-06 10:09:03 +02:00
Marcin Tomczyk
11864c71aa
UDPSOCKET_ECHOTEST change to tolerate duplicate packets
2019-10-16 03:55:26 -07:00
Michal Paszta
9ce69b6f7d
Fix compilation warnings from GCC
2019-09-16 12:11:26 +03:00
Michal Paszta
05e94afca3
Replace TEST_ASSERT_INT_WITHIN usage in netsocket tests
...
IPCore's netsocket tests are expected to run all tests even if some of them fail. The TEST_ASSERT_INT_WITHIN macro sets a global variable Unity.CurrentTestFailed which prevents further checks and gives incorrect failure count. Other assertion macros in Unity do not do that.
2019-08-22 14:32:59 +03:00
Teppo Järvelin
65bf17eff5
Fix netsocket tests for IAR
...
Test case printed IP address. If ip address is null, IAR compiled binary fails.
Added check for printing null. If IP address is null, then it prints string 'null'.
2019-08-15 15:26:36 +03:00
int_szyk
ae6f8be146
Newline at the end of files
2019-08-01 08:44:58 +02:00
int_szyk
8b68a1ea58
Updated testcases
2019-07-31 10:46:38 +02:00
Kevin Bracey
a522dcfa0a
Replace deprecated wait calls
2019-07-15 10:13:50 +03:00
Tymoteusz Bloch
c22350589d
UDPSOCKET_ECHOTEST_NONBLOCK performance improvement.
2019-06-10 11:20:12 +02:00
Martin Kojtal
dd77957d45
Merge pull request #10665 from tymoteuszblochmobica/json
...
Add hardcoded Echo server defaults for Greentea socket tests.
2019-06-09 18:05:03 +01:00
Kevin Bracey
2fbbd9d2ca
Introduce Semaphore::acquire methods
...
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().
Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".
Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Tymoteusz Bloch
d42ed4e6a9
Added hardcoded Echo server defaults for Greentea socket tests.
2019-05-27 14:41:17 +02:00
Mirela Chirica
26facc7f9b
Cellular: WISE-1570 needs greater receiving timeout to pass UDPSOCKET_ECHOTEST_NONBLOCK test
...
Reason for needing greater timeout could be this test's performance.
UDPSOCKET_ECHOTEST_BURST_NONBLOCK is implementing the receiving
differently and is passing with 1 second timeout.
2019-05-08 10:43:08 +03:00
Michal Paszta
d1017ea274
UDPSOCKET_ECHOTEST fails if a packet of any given size was not sent at least once
2019-04-18 11:38:11 +03:00
Michal Paszta
631540a421
ECHOTEST internal loop simplification and fix
...
The loop was wrongly incrementing the index of the array after assiging
the value. Thus the first array element was used twice and the last one
was never user. The issue is fixed and the loops are refactored and
simplified to avoid such confusion in the future.
2019-04-15 11:54:03 +03:00
Michal Paszta
3505923d02
Test udpsocket_recv_timeout does not check packet reception ratio
2019-04-08 12:56:29 +03:00
Michal Paszta
266d4c43a2
Handle oversized packets in tcp, tls and udp socket tests
2019-03-27 11:01:16 +02:00
Cruz Monrreal
d26fe0fe55
Merge pull request #10184 from mirelachirica/wise_1570_udp_echotest_nonblocking
...
Cellular: Increase receiving timeout for UDP echo non-blocking test
2019-03-27 00:34:47 -05:00
Mirela Chirica
ec3c6f37f9
Cellular: WISE-1570 needs greater receiving timeout to pass UDPSOCKET_ECHOTEST_NONBLOCK test
...
Reason for needing greater timeout could be this test's performance.
UDPSOCKET_ECHOTEST_BURST_NONBLOCK is implementing the receiving
differently and is passing with 1 second timeout.
2019-03-26 09:10:02 +02:00
Michal Paszta
b7ed4b5d9e
Refactor socket stats to reduce bioler plate
...
Add a proper test case setup and teardown which does the socket stats
checks in tcp, udp and tls.
2019-03-14 11:09:35 +02:00
kegilbert
194fa129fb
Update recently added previous macro name uses in tests
2019-03-01 13:53:47 -06: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
Martin Kojtal
091509705f
Merge pull request #9570 from VeijoPesonen/bugfix-tests-netsocket-udp_udpsocket_echotest_nonblock
...
tests-netsocket-udp: UDPSOCKET_ECHOTEST_NONBLOCK fixes
2019-02-12 09:55:20 +01:00
Veijo Pesonen
df3cdaa983
tests-netsocket-udp: UDPSOCKET_ECHOTEST_NONBLOCK execution time limit
...
Test case is allowed to take not more than a half what has been given
to the whole UDP suite.
UDP test cases reorganized so that the longest running ones are
executed last.
2019-02-04 12:33:34 +02:00
Michal Paszta
99fc26ecdf
Greentea Socket bind tests made ipv6-aware
2019-02-01 15:34:07 +02:00
Michal Paszta
fba66cf7f3
Greentea UDPSOCKET_RECV_TIMEOUT increase time tolerance
2019-02-01 14:22:05 +02:00
Veijo Pesonen
4d31455a0f
tests-netsocket-udp: UDPSOCKET_ECHOTEST_NONBLOCK restores non-blocking
...
Fixes a bug where after dropping bad packets receiver doesn't restore
the socket back to non-blocking state as it's supposed to.
2019-01-31 12:59:40 +02:00
Martin Kojtal
a4ed473afc
Merge pull request #9515 from VeijoPesonen/bugfix-tests-netsocket-udp_udpsocket_sendto_invalid
...
tests-netsocket-udp UDPSOCKET_SENDTO_INVALID allow unsupported empty UDP packet
2019-01-30 10:08:34 +01:00