Commit Graph

314 Commits (f1ad089660ac59eb81cfe5d76d7af394d471c30d)

Author SHA1 Message Date
Cruz Monrreal 06b618447f
Merge pull request #5973 from k-stachowiak/IOTSSL-1727-update-to-new-md-api
Update Mbed TLS HW acceleration partner code to new hashing API
2018-02-14 12:58:08 -06:00
Krzysztof Stachowiak f913940a0c Prepare test program to work in different MD implementations 2018-02-13 11:02:18 +01:00
Krzysztof Stachowiak 8c412ed886 Resolve compiler and linker issues in MD APIs
The features/mbedtls/targets/TARGET_STM/* files include constant needed
for the error codes returned from the MD functions.

The features/mbedtls/targets/hash_wrappers.c provides thin redirection
layer for the hardware accelerated MD implementations that rely on the
old API.

The TESTS/mbedtls/multi/main.cpp has been changed to use the new API
as its build environment does not rely on the translation unit
containing the necessary wrappers.
2018-02-13 10:07:28 +01:00
Martin Kojtal 04f0f2b1aa
Merge pull request #5604 from betzw/betzw_tests_netsocket_wb
TESTS/NETSOCKET: Refinement of `netsocket` tests
2018-02-08 15:25:45 +00:00
Cruz Monrreal 0978062dae
Merge pull request #5971 from maciejbocianski/ticker_tests_fix
Ticker tests fix
2018-02-07 20:17:39 -06:00
Cruz Monrreal 40d1c02e25
Merge pull request #5914 from mprse/Transaction_tests
Add Transaction class unit test.
2018-02-07 15:56:59 -06:00
Wolfgang Betz d6cb3853df Enlarge event queue in `test_socket_attach()` 2018-02-07 13:40:50 +01:00
Martin Kojtal 1d759d0b9c
Merge pull request #5895 from maciejbocianski/fileHandle_tests
Add FileHandle tests
2018-02-07 11:53:04 +00:00
Maciej Bocianski 8e1cfe2191 Add FileHandle tests 2018-02-02 14:57:12 +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
Maciej Bocianski 143765137e test-mbed_drivers-ticker: improve two ticker test accuracy
test_case_2x_callbacks test was redesigned to eliminate ticker rescheduling and improve time mesure accuracy.

Constant ticker rescheduling (detach()/attach_us() calls)
was causing the gap between consecutive callback calls was not exact 1ms
but 1ms + time needed to call the callback and attach new one.
New design just uses two tickers to update counter alternatively every 1ms without rescheduling them
2018-01-30 13:40:56 +01:00
Maciej Bocianski dd84c0bc5f test-mbed_drivers-ticker: fix ticker cross attach
This commit fixes ticker cross-schedule bug in test_case_2x_callbacks subtest

In effect of this bug:
    ticker_callback_1_switch_to_2 was called only once
    ticker2 was never been fired because it was repeatedly detached just before fire and attached again
2018-01-30 13:01:11 +01:00
Cruz Monrreal 3c793a714c
Merge pull request #5087 from mprse/rtc_test
Add RTC time test.
2018-01-26 17:26:38 -06:00
Cruz Monrreal 24859e90e1
Merge pull request #5789 from maciejbocianski/hal_critical_section_tests
Add tests for critical section HAL API
2018-01-26 10:39:33 -06:00
Przemyslaw Stekiel a25bf8fbc1 Add RTC time test. 2018-01-24 10:47:34 +01:00
Maciej Bocianski 628f521919 Add tests for critical section HAL API 2018-01-24 10:14:06 +01:00
Przemyslaw Stekiel 79e730328f Add Transaction class unit test. 2018-01-24 08:56:04 +01:00
Maciej Bocianski d747f1f300 Test set for critical section 2018-01-19 08:28:20 +01:00
Cruz Monrreal b59005154b
Merge pull request #5808 from SenRamakri/sen_ESP8266TestConfig
ESP8266 Test Config and fixes for tests tcp_echo/tcp_hello_world
2018-01-12 10:08:24 -06:00
Cruz Monrreal 45d7f505a8
Merge pull request #5831 from marcuschangarm/test-hal-flash-fix
Increase clock tolerance in Flash HAL test
2018-01-12 10:05:01 -06:00
Marcus Chang d60bed2da9 Increase clock tolerance in Flash HAL test
The current 0.1% clock tolerance is too small for certain platforms
which natural variance is larger than this. This commit increases the
tolerance to 0.5% instead.

Sample output from time_cpu_cycles called repeatedly in init,
before running any flash tests:

[1515706585.63][CONN][RXD] diff: 49316
[1515706585.69][CONN][RXD] diff: 49256
[1515706585.75][CONN][RXD] diff: 49286
[1515706585.81][CONN][RXD] diff: 49256
[1515706585.87][CONN][RXD] diff: 49225
[1515706585.94][CONN][RXD] diff: 49286
[1515706585.99][CONN][RXD] diff: 49317
[1515706586.06][CONN][RXD] diff: 49255
[1515706586.12][CONN][RXD] diff: 49286
[1515706586.18][CONN][RXD] diff: 49285
[1515706586.24][CONN][RXD] diff: 49286
[1515706586.31][CONN][RXD] diff: 49347
[1515706586.36][CONN][RXD] diff: 49347
[1515706586.43][CONN][RXD] diff: 49286
[1515706586.49][CONN][RXD] diff: 49286
[1515706586.55][CONN][RXD] diff: 49256
[1515706586.61][CONN][RXD] diff: 49286
[1515706586.68][CONN][RXD] diff: 49346
[1515706586.74][CONN][RXD] diff: 49347
[1515706586.80][CONN][RXD] diff: 49256

Notice the outliers will cause intermittent CI failures.
2018-01-11 13:44:51 -08: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
Jimmy Brisson 954960c2a1
Merge pull request #5784 from 0xc0170/fix_rtc_result
RTC test: fix __result variable
2018-01-08 10:38:26 -06:00
Przemyslaw Stekiel e725b4c2c5 RTC time conversion test - reduce number of tested years in order to reduce test execution time.
For each of the following years test example time of the first and last day of each month:
- first - 1970
- example not leap year (not divisible by 4)
- example leap year (divisible by 4 and by 100 and by 400)
- example leap year (divisible by 4 and not by 100)
- example not leap year (divisible by 4 and by 100)
- last fully supported  - 2105

Test execution time on K64F is now ~39 sec.
2018-01-08 10:14:54 +01:00
Jimmy Brisson c00efaec44
Merge pull request #5737 from jeromecoutant/PR_LP_TIMER_TEST
lp_timer test : add a minimum delta value
2018-01-04 10:03:53 -06:00
Jimmy Brisson b12d0fb56b
Merge pull request #5673 from maciejbocianski/mem_trace_tests
mem_trace tests refactoring
2018-01-04 09:54:40 -06:00
Jimmy Brisson 18e727623d
Merge pull request #5435 from mikaleppanen/emac_tests
Tests for wifi emac interface
2018-01-04 09:48:45 -06:00
Martin Kojtal 77cc7c7c8f RTC test: fix __result variable
Not needed, neither used anywhere. Teardown also can
be removed
2018-01-04 13:19:13 +00:00
jeromecoutant 9a43912177 lp_timer test : add a minimum delta value 2018-01-03 15:37:19 +01:00
Anna Bridge 2f4f82ec74
Merge pull request #5723 from SeppoTakalo/wifi-construtor-fix
Remove destruction of WiFi interface in test runs
2017-12-29 14:29:38 +00:00
Cruz Monrreal II 43af0d7395
Merge pull request #5743 from VeijoPesonen/greentea-wifi-fixes-disconnect
Greentea wifi test cases - disconnect done as teardown after each connect
2017-12-28 21:02:42 +00:00
Veijo Pesonen 5585ba60a5 Greentea test case WIFI-CONNECT-NOCREDENTIALS- accept also parameter error if AP is not found 2017-12-22 13:02:06 +02:00
Veijo Pesonen c993057537 Security protocol made configurable via json 2017-12-22 12:54:22 +02:00
Veijo Pesonen 402ab81730 remove disconnect from test cases as it's going to be called implicitly from get_interface-function 2017-12-22 10:18:28 +02:00
Maciej Bocianski cc580d7532 mem_trace tests refactoring 2017-12-22 07:56:56 +01:00
Veijo Pesonen ca95e3f88b Greentea WIFI-CONNECT-SECURE must use NSAPI_SECURITY_WPA_WPA2 2017-12-21 08:29:09 +02:00
Veijo Pesonen f71756cf98 Greentea WIFI-SCAN - make possible to disable check against assumed channel
It's possible that a device does not support setting the channel to be used.
In case channel is not set by the device lets disable the check.
2017-12-21 08:29:09 +02:00
Veijo Pesonen 8c421e20d6 Greentea Wifi testcase fixes
Call disconnect when connect has been tested. Also instead of waiting
for parameter error in case of missing SSID give missing SSID error
code.
2017-12-21 08:29:09 +02:00
TomoYamanaka 4f4b4ddf36 Change the "thread" test main for Cortex-A
In pararell threads of "thread" test is a simple thread, but it seems that there is a difference in the stack used between Cortex-A and Cortex-M.
As a result of check, in Cortex-A, program aborts because of the lack of stack when PARALLEL_THREAD_STACK_SIZE is 384, workes properly when PARALLEL_THREAD_STACK_SIZE is 512 at least.
2017-12-21 14:09:24 +09:00
TomoYamanaka a105f6f356 Change the "malloc" test main for Cortex-A
"malloc" test is used a simple thread that executes only malloc and free, but it seems that there is a difference in the stack used between Cortex-A and Cortex-M.
As a result of check, in Cortex-A, program aborts because of the lack of stack  when THREAD_STACK_SIZE is 256, workes properly when THREAD_STACK_SIZE is 512 at least. Since it seems that the definition processing of "DEFAULT_STACK_SIZE" was gone from Mbed OS by updating CMSIS5/RTX5, I setted 512 directly for Cortex-A.
2017-12-21 14:09:24 +09:00
TomoYamanaka 698de3b5ff Modify 2-byte code of "heap and stack" test main for Cortex-A
I modified "space" character from 2-byte code to 1-byte code in "heap and stack" test main.
2017-12-21 14:09:24 +09:00
Seppo Takalo 8bfe5779b3 Remove destruction of WiFi interface in test runs
Most of our IP stacks don't allow removal of interfaces so
interface destructor can not reliably clean up. Therefore we
cannot rely its behaviours in test case.

Instead run interface->disconnect() in case interface was already
created.
2017-12-20 16:58:11 +02:00
Martin Kojtal 63a923752b
Merge pull request #5568 from VeijoPesonen/greentea-wifi-fixes
Greentea Wifi testcase fixes
2017-12-20 14:52:44 +00:00
Martin Kojtal b89cf3ff75
Merge pull request #5578 from mprse/CircularBuffer_tests
CircularBuffer class modification and test
2017-12-20 14:51:44 +00:00
Martin Kojtal bea41d1ebb
Merge pull request #5635 from c1728p9/fix_lazy_init
Protect local static object construction in ARMCC
2017-12-12 17:41:21 +00:00
Martin Kojtal 5c98ca56fc
Merge pull request #5648 from maciejbocianski/singletonPtr_tests
Add SingletonPtr test
2017-12-12 17:40:36 +00:00
Martin Kojtal be52ba2156
Merge pull request #5363 from mprse/extended_rtc
Add support and tests for extended RTC
2017-12-12 17:36:44 +00:00
Martin Kojtal 57a5735387
Merge pull request #5576 from jeromecoutant/PR_IP
Ethernet tests update
2017-12-12 17:31:23 +00:00
Przemyslaw Stekiel fcdaeccea1 Add tests for extended RTC. 2017-12-05 07:53:41 +01:00