Commit Graph

334 Commits (1dfe716b56850053583cc8c88b3d1eb7dccf0d31)

Author SHA1 Message Date
Cruz Monrreal 9ddb092d43
Merge pull request #6230 from bulislaw/system_reset
Add system_reset call
2018-03-01 10:31:07 -06:00
Cruz Monrreal acad33ac13
Merge pull request #5548 from fkjagodzinski/test-systimer
Tests for SysTimer (the idle loop timer for tickless mode)
2018-02-28 18:47:10 -06:00
Bartek Szatkowski 73b054601d Add tests for system_reset() 2018-02-28 16:42:34 +00:00
Filip Jagodzinski 74e0f95cd6 RTOS: SysTimer: Add tests 2018-02-28 14:37:13 +01:00
Shrikant Tudavekar efe4600cee measure the time over a longer range 2018-02-26 18:03:08 -06:00
Cruz Monrreal 3d37d819e9
Merge pull request #5046 from fkjagodzinski/timerevent_tests
TimerEvent tests
2018-02-26 15:02:52 -06:00
Cruz Monrreal b7726f2bfd
Merge pull request #6182 from maciejbocianski/fileHandle_compilers_fix
platform: FileHandle test - remove optimization for stdlib diversity
2018-02-26 14:36:58 -06:00
Martin Kojtal 107976773c
Merge pull request #6140 from davidsaada/david_flashiap_xsectors
FlashIAP driver modifications
2018-02-23 13:26:20 +01:00
Maciej Bocianski 0b6f14fbd1 platform: FileHandle test - remove optimization for stdlib diversity 2018-02-23 10:07:52 +01:00
Filip Jagodzinski 44c4583f2a Tests: Drivers: TimerEvent: Add tests 2018-02-23 09:13:37 +01:00
Cruz Monrreal 55f710f431
Merge pull request #6162 from maciejbocianski/sleep_manager_racecondition_test_fix
sleep_manager_racecondition test fix for devices with low CPU clock
2018-02-22 21:55:10 -06:00
David Saada 0aeeece97d FlashIAP driver modifications:
- Support programming across sectors.
- Support program size not aligned to page size.
- Fix validations on sector erase.
2018-02-22 22:48:29 +02:00
Martin Kojtal 414b2d971d
Revert "Update Mbed TLS HW acceleration partner code to new hashing API" 2018-02-22 11:20:35 +00:00
Maciej Bocianski 5aaad0850c sleep_manager_racecondition: fix for slow devices
sleep_manager_racecondition test fix for devices with low CPU clock

This RP contains fix for sleep_manager_racecondition test
for very slow devices (like NRF51). It fixes the test itself
as well as side effects of fix introduced in
 #5046 (us ticker: fix fire interrupt handling)

The idea of the test was to test race condition between main thread
and interrupt handler calling the same function.
To efficiently test this, each handler call should interrupt
main thread to make race more likely.
On very slow devices (like NRF51) when we set very low ticker period
(e.g less then 1000us for NRF51) there is no much time for thread scheduling.
On such slow devices, setting period to 500 us cause that
main thread is scheduled very rarely and only handler is
constantly called making test unreliable.
Fix introduced in #5046 (us ticker: fix fire interrupt handling)
changed fire_interrupt function implementation causing more
interrupt tailing thus even less time for main thread scheduling.
After introduction of #5046 (us ticker: fix fire interrupt handling)
when running sleep_manager_racecondition test on NRF51
(with ticker1.attach_us(&sleep_manager_locking_irq_test, 500);)
test is failing with timeout due to the fact that interrupt
handler is constantly called and main thread is never scheduled.
2018-02-22 11:36:08 +01:00
Martin Kojtal 5c7cd1f689
Merge pull request #6139 from VeijoPesonen/eth_n_wifi-drv_n_tc_fixes
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
2018-02-21 15:19:55 +01:00
Cruz Monrreal 45b4062f8b
Merge pull request #6093 from jeromecoutant/PR_IP_PRESSURE
NETSOCKET MBED_EXTENDED_TESTS json configuration
2018-02-20 13:27:31 -06:00
Veijo Pesonen 8e12db1a2b Fix WIFI-CONNECT-PARAMS-CHANNEL-FAIL Greentea test case
The test case is executed succesfully when usage of wrong channel is detected
2018-02-20 16:09:46 +02:00
Martin Kojtal acd1895052
Merge pull request #6135 from mprse/tests-events-timing_remove_debug_printf
tests-events-timing - print debug info only in case of failure
2018-02-19 17:13:49 +01:00
Przemyslaw Stekiel 2b68eb19e3 tests-events-timing - print debug info only in case of failure.
In the 'Testing accuracy of equeue semaphore' test case result is printed out in each loop iteration.
Since debug prints should not exist in the final test version I suggest to print information only in case of failure.
Additionally time needed to print single info is equal to ~25 ms (K64F/GCC_ARM). The while loop is designed to execute until 20000 ms elapses, so this print has also impact on number of times the loop is executed (number of semaphore accuracy checks).
2018-02-19 11:59:17 +01:00
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
jeromecoutant d25d457652 NETSOCKET pressure tests configuration 2018-02-14 15:18:07 +01: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