Commit Graph

620 Commits (ab7b93ca583fe0779dd52f0ee41e41fed70ee2c5)

Author SHA1 Message Date
Deepika 25e2b8838a Added additional read to care of lazyily initialized timer 2018-05-17 10:25:31 -05:00
Cruz Monrreal 77f5c4ac04
Merge pull request #6749 from AndrzejKurek/feature-mbedtls-platform-setup
Add platform setup and teardown calls to mbedtls tests
2018-05-17 10:08:44 -05:00
Deepika 7900863c4d Updated test to not use event queue.
Test was failing on limited RAM devices, because of shared event queue size.
Updated test to use thread instead of event queue.
2018-05-16 14:26:08 -05:00
Deepika 029237b683 Addressed review comments
1. LP ticker limiation note
2. Use read_us in mbed_uptime function
3. Doxygen recommendations
4. Use us_timestamp_t instead uint64_t
5. Astyle changes
2018-05-15 11:36:08 -05:00
deepikabhavnani 3420ff7f9c CPU statistics addition
API to get CPU stats like sleep/deepsleep time, uptime and idle time.
These can be used by application to know the CPU Usage runtime.
2018-05-15 11:20:52 -05:00
Deepika 1961428c1b OS version added + CPUID for cortex-M only
CPUID base register is available for Cortex-M processors only.
Cortex-A devices have Main ID Register, which can be used in future to
get processor info.
2018-05-15 10:22:13 -05:00
deepikabhavnani 40021eb176 Added test for mbed_stats_sys_get() API 2018-05-15 10:17:44 -05:00
Cruz Monrreal 46c1e94fc5
Merge pull request #6795 from deepikabhavnani/thread_stats
Thread stats API
2018-05-15 10:08:05 -05:00
Cruz Monrreal 15ff9a8bf7
Merge pull request #6864 from davidsaada/david_flashiap_unaligned_src
FlashIAP: Fix problem of programming source buffer not aligned to 4
2018-05-14 10:35:38 -05:00
Cruz Monrreal 2104d8ab5b
Merge pull request #6711 from marcuschangarm/cleanup-nrf5x
Cleanup TARGET_NRF5 and TARGET_NRF5x
2018-05-11 19:15:05 -05:00
deepikabhavnani 97c88188d0 Cleanup
1. Enable watermark to get stack space information
2. Restructured code
3. Throw error if MBED_THREAD_STATS_ENABLED is not set
4. Astyle changes
2018-05-11 10:06:44 -05:00
deepikabhavnani f43b16ffd9 Cleaup and review comments addressed
1. Removed prefix thread_ from all elements of mbed_stats_thread_t
2. #if conditions aligned to rest of the file
2018-05-11 10:05:35 -05:00
deepikabhavnani bb8ccbd373 Checking difference in thread count + review comments 2018-05-11 10:05:33 -05:00
deepikabhavnani 1dad73949c Thread statistics addition.
API to get all system threads information and states.
2018-05-11 10:05:32 -05:00
David Saada 9cdecf4d5a FlashIAP: Fix problem of programming source buffer not aligned to uint32_t 2018-05-10 12:00:29 +03:00
Przemyslaw Stekiel 2ccc11f243 tests-mbed_drivers-rtc: Add one second tolerance in functional tests.
Currently test assumes that 1 sec is long enough to set RTC time and read same time which has been set.
In some cases extra time for synchronisation between clock domains is needed and after setting/reading operations the read value might be different than one which has been set (+1 sec).
Additionally in some cases when lp ticker is based on RTC, the RTC implementation may use mechanism to trace elapsed seconds without modifying RTC registers. In such case it is possible that second will change immediately after setting time.

Add 1 sec tolerance (min possible) for such checks.
2018-05-09 14:41:40 +02:00
Marcus Chang 1aebdcbee5 Reorganize TARGET_MCU_NRF51822_UNIFIED directories
The unified NRF51 target and feature BLE directories have been
reorganized to follow the naming and directory structure of the
NRF52 implementation.

This reorganization does not include TARGET_MCU_NRF51822 and
derived targets.
2018-05-08 10:10:01 -07:00
Andrzej Kurek 29515c589b Update logs and remove unnecessary defines for Mbed TLS tests 2018-05-08 12:53:29 +01:00
deepikabhavnani d43d9b134b Moved stats test to platform folder 2018-05-01 14:03:31 -05:00
Marcus Chang 5910cd7546 Re-enable flash clock test for NRF52 but with higher tolerance
The flash clock test is disabled for the NRF52 series. This change
re-enables the test but with a higher tolerance to accommodate the
high jitter on the current ticker implementation.
2018-04-26 09:33:43 -07:00
Andrzej Kurek 1938faa449 Add platform setup and teardown calls to mbedtls tests 2018-04-26 08:23:33 +01:00
Martin Kojtal 675528b6c0
Merge pull request #6534 from c1728p9/rtos_suspend
Update idle loop to reduce calls to suspend
2018-04-25 13:21:47 +01:00
Brian Daniels 631e5ebdee Modifying echo test to be driven more from the device.
Previously, the echo test followed a flow like the following:

-STEP-	-HOST PC-                  -DEVICE-
0	send _sync
1				   echo back _sync
2				   send echo_count
3	echo back echo_count
4	send first echo packet
5				   echo back echo packet
	(repeat echo steps)

However, as noted by issue #6659, this test would somtimes fail between
steps 4 and 5. To ensure each KV pair makes to the correct destination,
we usually write the KV back. Step 4 does not wait for this to happen
and starts sending echo packets. So the device is acting as the "echo
server".

This change makes the host PC the "echo server". The idea being that the
device will be slower and the host pc should always be able to keep up
with it, not the other way around.
2018-04-23 17:56:13 -05:00
Marcus Chang 60397c527e Renamed NRF52 targets for HAL critical section test 2018-04-19 09:40:41 -07:00
Filip Jagodzinski ec59cbb6f8 RTOS: SysTimer: Fix test compilation error on ARM & IAR 2018-04-17 09:38:26 -05:00
Filip Jagodzinski 20013d75d6 RTOS: SysTimer: Update tests
Use a mock ticker object instead of the lp_ticker for update_tick() and get_time() tests.
2018-04-13 10:07:00 +02:00
Russ Butler 044eb1e8ce Update the SysTimer test
Update the SysTimer test to match the updated API. Changes are:
- increment_tick() renamed to _increment_tick() and explicitly
    synchronized
-update_tick() replaced with resume() and a call to suspend() was added
    before this
2018-04-10 10:54:31 -05:00
Deepika bf0393aaa9 Added test for MbedCRC.h 2018-03-23 14:54:24 -05:00
Cruz Monrreal 9932b4c983
Merge pull request #6309 from deepikabhavnani/peek_api
Peek API to view data of buffer without popping
2018-03-22 11:28:15 -05:00
Martin Kojtal 447e96e4c8
Merge pull request #6340 from cmonr/disable-failing-flash-test
Disables flash clock and cache test
2018-03-20 18:29:19 +01:00
Cruz Monrreal II 9f6301333b Disabled flash clock and cache test for NRF52 MCUs.
This is meant to be a temporary fix until the issue has been root caused, and Jenkins CI is no longer intermittently failing.
2018-03-19 11:13:22 -05:00
Cruz Monrreal b18c88e2cc
Merge pull request #5106 from fkjagodzinski/timeout_tests
Timeout & LowPowerTimeout tests
2018-03-15 10:55:15 -05:00
Cruz Monrreal 9cac3b2f6b
Merge pull request #6149 from bmcdonnell-ionx/typos
Fix typos in the files
2018-03-15 10:53:03 -05:00
Deepika 0b9f301268 Test to verify peek API 2018-03-09 16:47:48 -06:00
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 82f781ce3d Tests: Drivers: Timeout: Update unit tests
Added unit tests for Timeout API.
Added unit tests for LowPowerTimeout API.
Moved all existing test cases to a header file.
2018-02-28 17:27:46 +01: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
Brendan McDonnell c4f10aafee typos 2018-02-20 20:11:19 -05: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
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
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
Maciej Bocianski 2ac12028ca Add SingletonPtr test 2017-12-04 11:42:23 +01:00
Russ Butler 1faf46e161 Fix deficiency in the race test
The test for construction of local static objects doesn't check
to see if the object returned has been fully initialized. Because
of this, an error with ARMCC was not detected.

This patch adds an assert to the race_test to ensure that the
object has been properly initialized.
2017-12-01 10:49:50 -06:00
Veijo Pesonen 2d7a79f123 Greentea Wifi testcase fixes
Replace 'TEST_PASS' with 'return'
2017-12-01 16:35:55 +02:00
Przemyslaw Stekiel a488424d26 Add CircularBuffer test. 2017-11-29 11:26:36 +01:00
Wolfgang Betz 043ee4a6f5 Split test for secure & unsecure tests 2017-11-28 13:17:38 +01:00
Wolfgang Betz 3613803a7a Correct WiFi driver name to `X_NUCLEO_IDW0XX1` 2017-11-28 13:17:37 +01:00
Jimmy Brisson 70522bb44b
Merge pull request #5360 from maciejbocianski/thread_fix
threads test adjust to run on devices with small RAM
2017-11-27 10:35:44 -06:00
Veijo Pesonen e488b2c04f Greentea Wifi testcase fixes
ONME-3266 Greentea testcase WIFI-SCAN fails arbitrarily
ONME-3278 Greentea testcase WIFI-SET-CREDENTIAL doesn't try WEP with valid credentials
ONME-3279 Greentea testcase WIFI-GET-RSSI uses arbitrary RSSI value limits
ONME-3280 Greentea testcase WIFI-CONNECT-PARAMS-VALID-SECURE assumes WPA2
2017-11-23 13:57:05 +02:00
Jimmy Brisson cfa9e47aee
Merge pull request #5483 from maciejbocianski/heap_and_stack_tests
heap_and_stack test refactoring
2017-11-22 10:15:03 -06:00
Jimmy Brisson 308833b431
Merge pull request #5323 from maciejbocianski/malloc_tests
malloc test refactoring
2017-11-22 10:14:35 -06:00
Maciej Bocianski bc99556151 threads test: increase threads heap size 2017-11-22 12:54:43 +01:00
Mika Leppänen 5c15819130 Tests for wifi emac interface 2017-11-21 09:52:58 +02:00
Jimmy Brisson 593eab2603
Merge pull request #5123 from maciejbocianski/signal_tests
Extends test set for Thread signals
2017-11-20 10:49:58 -06:00
Maciej Bocianski bc103359f7 heap_and_stack test refactoring 2017-11-20 11:24:49 +01:00
Martin Kojtal 56aa7c396f
Merge pull request #5261 from maciejbocianski/ticker_tests2
Extends test set for Ticker class
2017-11-16 16:23:35 +00:00
Martin Kojtal eb5d3fffff
Merge pull request #5403 from mprse/timer_test_delta_fix
Provide fixes for Timer and LowPowerTimer tests.
2017-11-16 16:19:24 +00:00
Russ Butler 93cf15d57c Fix and add test for ConditionVariable
Fix the circular linked list handling in ConditionVariable and add a
test to validate the linked list implementation.
2017-11-15 16:15:27 -06:00
Martin Kojtal 41eb565d9c
Merge pull request #5342 from ARMmbed/feature_cortex_a
Update CMSIS/RTX with Cortex-A support
2017-11-15 11:24:36 +00:00
Maciej Bocianski a7f31c9cc1 malloc test refactoring 2017-11-15 11:04:40 +01:00
Przemyslaw Stekiel 78e1362ec0 Provide fix for Issue #5468.
Issue: https://github.com/ARMmbed/mbed-os/issues/5468
Increased DELTA value for Timer and Low Power Timer tests.
2017-11-13 11:03:29 +01:00
Przemyslaw Stekiel d962f67ca2 Move Timer test, modify ASERT macros, fix comments.
Move Timer test to TESTS/mbed_drivers/ directory which is more suitable.
Fix few comments which are incorrect.
Use more relevant ASERT macros.
2017-11-13 10:43:26 +01:00
Przemyslaw Stekiel d49899a6e2 Provide fix for Timer and LowPowerTimer tests (time accumulation).
LowPoterTimer test gives sometimes failed result while testing measured time accumulation. The check which verifies if total number of elapsed milliseconds is valid fails. Test assumes that delta value equal to 1 ms is sufficient for all test cases, which is not true since in case where time measurement is performed few times in sequence the measurement error also accumulates and 1 ms might be not enough. To solve this problem delta value for milliseconds tests must be updated.
2017-11-13 10:12:11 +01:00
Bartek Szatkowski 8eebcff166 Disable heap and stack tests for Cortex A
These tests are not compatible with Cortex A due to __get_MSP usage.
2017-11-10 09:53:41 +00:00
Sarah Marsh 8c5c905d95 Limit size of equeue for sigio net test 2017-11-09 17:56:53 -06:00
Martin Kojtal 6713513ce9
Merge pull request #5370 from maciejbocianski/event_queue_mem_fix
event queue test: fix out of memory for NUCLEO_F070RB
2017-11-09 16:40:16 +00:00
Martin Kojtal c45dd269f5
Merge pull request #3648 from c1728p9/condition_variable
Add ConditionVariable to mbed rtos
2017-11-09 16:38:02 +00:00
Martin Kojtal adfe004303
Merge pull request #5425 from fkjagodzinski/test-rtostimer-update
RtosTimer tests update
2017-11-09 16:31:39 +00:00
Maciej Bocianski 0151b1c359 small supplement for PR #5338 2017-11-03 15:32:08 +01:00
Maciej Bocianski f28aef4b01 event queue test: fix out of memory problem for NUCLEO_F070RB 2017-11-03 14:47:20 +01:00
Filip Jagodzinski efbfc5a5b8 Tests: RTOS: RtosTimer: Refactor for readability 2017-11-03 10:57:20 +01:00
Russ Butler d01c7fa626 Add test cases for ConditionVariable
Add basic tests for the ConditionVariable class.
2017-11-02 21:02:37 -05:00
Jimmy Brisson 3a05b63f1e
Merge pull request #5158 from YarivCol/master
RTOS : added empty and full functions to Mail and Queue
2017-11-02 10:46:06 -05:00
Jimmy Brisson d1c65c9243
Merge pull request #5338 from maciejbocianski/malloc_fix
malloc test: fix out of memory problem for NUCLEO_F070RB
2017-11-02 10:42:21 -05:00
Jimmy Brisson 1454e6b54b
Merge pull request #5047 from maciejbocianski/lp_ticker_tests
Test set for LowPowerTicker class
2017-11-02 10:37:00 -05:00
Jimmy Brisson c7b4c7a7ef
Merge pull request #5379 from maciejbocianski/race_mem_fix
race test: fix out of memory problem for NUCLEO_F070RB
2017-11-01 14:05:58 -05:00
Filip Jagodzinski fc27107311 Tests: RTOS: RtosTimer: Fix tests for NRF51_DK board
Additional delay is needed to prevent random failures when
waiting for a semaphore.
2017-10-31 18:19:36 +01:00
Jimmy Brisson 12dace0a4b
Merge pull request #5377 from maciejbocianski/semaphore_mem_fix
semaphore test: fix out of memory problem for NUCLEO_F070RB
2017-10-30 10:11:29 -05:00
Jimmy Brisson 3749f2d469
Merge pull request #5376 from maciejbocianski/mail_mem_fix
mail test: fix out of memory problem for NUCLEO_F070RB
2017-10-30 10:10:47 -05:00
Jimmy Brisson 55197e78f3
Merge pull request #4936 from mprse/memPool_test_and_fixes
Add MemoryPool test.
2017-10-30 10:07:49 -05:00
Maciej Bocianski 6bda5907aa malloc test - reduce heap usage 2017-10-27 14:32:03 +02:00
Przemyslaw Stekiel b7e27760d9 Add MemoryPool test.
Add test for MemoryPool.
2017-10-27 08:07:34 +02:00
Maciej Bocianski adb3dacd9d mail test: fix out of memory problem for NUCLEO_F070RB 2017-10-26 14:33:14 +02:00
Maciej Bocianski 1c39f5b37e semaphore test: fix out of memory problem for NUCLEO_F070RB 2017-10-26 14:32:42 +02:00
Maciej Bocianski e174bd439c Extends test set for signals 2017-10-26 14:13:09 +02:00
Anna Bridge ffb7ae0c9e Merge pull request #5365 from 0xc0170/fix_reduntant_tst
Remove redundant ISR test.
2017-10-26 10:59:50 +01:00
Maciej Bocianski 9bf936cb49 race test: fix out of memory problem for NUCLEO_F070RB 2017-10-25 09:40:05 +02:00
Przemyslaw Stekiel cbd402e426 Remove redundant ISR test. 2017-10-23 17:51:54 +01:00
Maciej Bocianski d231837b48 threads test adjust to run on devices with small RAM 2017-10-23 09:39:48 +02:00
Anna Bridge 9c1fd48529 Merge pull request #5278 from maciejbocianski/heap_and_stack_tests
Move heap_and_stack tests to TESTS/mbed_bootstrap
2017-10-20 10:25:07 +01:00
Anna Bridge 4d25bccbb1 Merge pull request #5081 from maciejbocianski/events_flags_tests
Extends test set for EventFlags class
2017-10-20 10:24:31 +01:00
Martin Kojtal cbb8a1f994 Merge pull request #4947 from fkjagodzinski/rtostimer_tests
Rtostimer tests
2017-10-19 16:46:12 +01:00
Martin Kojtal 919e145bde Merge pull request #5243 from maciejbocianski/basic_tests
Basic test refactoring
2017-10-19 16:43:49 +01:00
Maciej Bocianski aaa15bcf58 Extends test set for Ticker class (round 2) 2017-10-19 15:12:44 +02:00
Przemyslaw Stekiel 5a833ffd0a Add fix for Timer test - provide missing get_info ticker interface function 2017-10-17 10:47:51 +02:00
Jimmy Brisson 23be7a814d Merge pull request #5074 from mprse/lp_timer_test
Add Low Power Timer test.
2017-10-13 09:21:46 -05:00
Jimmy Brisson 84f2d089f4 Merge pull request #5147 from 0xc0170/fix_deepsleep_tests
Test: deepsleep() API replacement
2017-10-13 09:19:41 -05:00
Jimmy Brisson fad67559ae Merge pull request #5028 from c1728p9/ticker_api_changes
Update ticker to map closely to hardware
2017-10-13 09:18:02 -05:00
Jimmy Brisson bf9c507467 Merge pull request #4971 from mprse/test_timer
Add test for Timer class.
2017-10-13 09:17:31 -05:00
Maciej Bocianski 9ab2a1df32 Move heap_and_stack tests 2017-10-13 08:23:55 +02:00
Maciej Bocianski 9fb4fd017a Test set for LowPowerTicker class 2017-10-11 15:01:15 +02:00
Przemyslaw Stekiel 34a03267d8 Add Low Power Timer test. 2017-10-11 14:55:34 +02:00
Maciej Bocianski 0e014c9bc7 Extends test set for EventFlags class 2017-10-11 11:02:09 +02:00
Jimmy Brisson df88a9dcc2 Merge pull request #5272 from studavekar/echo_test_fix_handshake
Fix echo test handshake and reduce uart load
2017-10-09 13:05:03 -05:00
Jimmy Brisson 42532d7806 Merge pull request #5161 from SeppoTakalo/wifi_tests
Implement functional Wifi tests
2017-10-09 11:13:37 -05:00
Martin Kojtal 943fc32c73 Merge pull request #5255 from c1728p9/fix_ticker_test
Prevent use of deleted ticker in Ticker test
2017-10-09 14:05:22 +01:00
Maciej Bocianski 73a91e05fd Basic test refactoring 2017-10-09 13:27:07 +02:00
Shrikant Tudavekar c5621b9eb3 fix echo test handshake and reduce uart load
1) if we receive more than one __sync, previous handshake would consider
it as echo_count and try to decode the value. Now we skip superfluous __sync.

2) reduce the uart load produced by the test, as we are heavily running tests in
parallel and not one-to-one this update was required.
2017-10-08 11:21:17 -05:00
Russ Butler 77dd420509 Increase ticker test time for slower devices
Increase the hal ticker test time from 30s to 60s to prevent
a timeout from occurring on slower devices, such as the nrf51.
2017-10-05 11:57:35 -05:00
Russ Butler ec55b82acf Update ticker to map closely to hardware
Allow tickers to specify their native frequency and number of bits.
This allows the conversion to happen in common code rather than in
each vendor's implementation.
2017-10-05 11:57:12 -05:00
Martin Kojtal b30c622522 Test: deepsleep() API replacement
Use sleep() as entry function + check to be certain we
are entering deepsleep when required by test (should be allowed)
2017-10-05 16:43:57 +01:00
Jimmy Brisson 4dff32ab5a Merge pull request #5220 from c1728p9/sleep_lock_fixes
Fix deep sleep lock bugs
2017-10-05 10:03:44 -05:00
YarivCol e0a0615038 fix tests 2017-10-05 07:41:47 -07:00
YarivCol f403623ba5 Add test for empty, full functions in queue and mail 2017-10-05 07:00:18 -07:00
Russ Butler ad0b11565c Prevent use of deleted ticker in Ticker test
In test_case_2x_callbacks two tickers are setup to repeatedly
reschedule each other. When these tickers are deleted this
rescheduling is still occurring and can lead to a deleted ticker
being scheduled.

When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context

Note - this problem was not detected by CI since the test reported
the correct results back to the host test and only experienced this
error on tear down.

This problem can be reproduced on an nrf51 by first building the ticker
test with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker
--compile -DMBED_TRAP_ERRORS_ENABLED=1
-DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1"

And then running testing with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"
2017-10-04 16:07:41 -05:00
Seppo Takalo 429b0688bd Add license texts 2017-10-04 17:45:25 +03:00
Seppo Takalo 80198f2dcd Add Doxygen documentation for testcases. 2017-10-04 12:32:46 +03:00
Seppo Takalo 72e7c326c9 Fix builds for targets without wifi or without mbed_app.json 2017-10-04 12:01:49 +03:00
Seppo Takalo 5b40280cab Update help text 2017-10-04 12:01:49 +03:00
Seppo Takalo fde08a1ee8 Fix includes.
Cannot include header file witin a function (without severe side effects)
2017-10-04 12:01:49 +03:00
Seppo Takalo 0498e8d3c3 Update template mbed_app.json 2017-10-04 12:01:49 +03:00
Seppo Takalo 3ac788fa02 Set timeout to 4 minutes.
Wifi connections and scanning takes long time. 2 minutes might not be enough.
2017-10-04 12:01:49 +03:00
Seppo Takalo 3d87507c98 Implement functional Wifi tests
Implement 100% function coverage for WifiInterface as specified
in "Wifi test plan"
2017-10-04 12:01:49 +03:00
Russ Butler d910dc5bc4 Revert #5006 - Extends test set for Ticker class
This commit reverts commit c1c0f1ea57
because it causes nightly builds to fail. This is because extra tests
added in tests-mbed_drivers-ticker fail on some targets, such as the
KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
2017-10-03 11:44:24 -05:00
Przemyslaw Stekiel 4509165d61 Add test for Timer class. 2017-10-03 11:54:58 +02:00
Russ Butler ea468856c4 Add a test to validate locking
Test that DeepSleepLock and Timer lock deep sleep at the correct time
and do no leave sleep locked after they are destroted.
2017-10-02 11:35:03 -05:00
Jimmy Brisson 90e5483bbe Merge pull request #5006 from maciejbocianski/ticker_tests
Extends test set for Ticker class
2017-09-29 10:06:14 -05:00
Jimmy Brisson e3cb228d5e Merge pull request #4795 from sarahmarshy/test-configs
Add configurable network driver tests
2017-09-28 14:06:38 -05:00
Filip Jagodzinski 311d38b925 Tests: RTOS: RtosTimer: Fix tests on debug profile
Redefine error() as noop to fix tests being aborted when compiled
with -DMBED_TRAP_ERRORS_ENABLED=1.
2017-09-26 13:41:18 +02:00
Sarah Marsh fbe8dfae19 update domain name to os.mbed.com 2017-09-22 09:40:32 -05:00
Martin Kojtal b72bd08644 Merge pull request #4965 from deepikabhavnani/IAR_heap_stats
Add heap stats for IAR
2017-09-22 11:34:47 +01:00
Martin Kojtal 1fed1d003e Merge pull request #4684 from deepikabhavnani/thread_stack_issue
Add thread terminate hook
2017-09-22 11:31:39 +01: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
Deepika 459e7d4725 IAR heap stats added 2017-09-18 10:24:01 -05:00
Deepika 6f5df1f4c3 Threads test require more time to finish 2017-09-15 11:39:47 -05:00
Russ Butler 47b0f31d32 Remove direct use of us and lp ticker from tests
Remove the direct use of the microsecond and low power ticker from
the tests. This enforces that sleep mode is properly locked when
using timers. Furthermore, this prepares the codebase for new ticker
changes which allow differing clock frequencies and timer bit widths.
2017-09-13 20:11:39 -05:00
Maciej Bocianski c1c0f1ea57 Extends test set for Ticker class 2017-09-12 16:04:52 +02:00
Shrikant Tudavekar 1cb41e9715 use default macro for armcc 2017-09-12 01:00:45 -05:00
Shrikant Tudavekar 45202df55e gaurd thumb instruction for amrc6 2017-09-11 20:09:43 -05:00
Anna Bridge 2955a0adc6 Merge pull request #5063 from 0xc0170/fix_lpticker_test
Fixing lp ticker and sleep manager tests
2017-09-11 22:28:52 +01:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
Russ Butler f746fc5bac Allow lp_ticker test to coexist with TimerEvents
The lp_ticker test overrides the default ticker handler for the
low power ticker. This stops all other low power TimerEvents in the
system, including the ones for tickless, from getting called. Because
of this devices with tickless enabled malfunction during this test.

This patch fixes this problem by passing all lp ticker events it did
not trigger on to the TimerEvent irq handler.
2017-09-10 17:06:46 -05:00
Russ Butler 30450d40d6 Decrease error in Timeout test due to ISR latency
Increase the Timeout period from 1ms to 10ms so interrupt latency has
1/10th the effect on the measurement. This prevents failures due to
interrupt latency causing a drift.
2017-09-09 20:43:36 -05:00
Russ Butler d9aff6f0dd Prevent deeps sleep in regular sleep test case
Lock deep sleep before calling sleep to prevent the device from
entering deep sleep mode.
2017-09-09 20:43:35 -05:00
Martin Kojtal deb1febb8b sleep manager test: fix Thread stack size
Decrease the default stack size as it's not needed for purposes of testing.
2017-09-09 20:42:55 -05:00
Jimmy Brisson e12f116ec1 Merge pull request #4912 from 0xc0170/dev_sleep_drivers
Add sleep manager API
2017-09-07 18:26:49 -05:00
Martin Kojtal c5a41d83c2 test: add sleep manager tests
This commits contains two tests:
- race condition
- deep sleep locking/unlocking
2017-09-07 15:35:07 +01:00
Deepika 5875569070 Added function header for stl test 2017-09-06 09:51:16 -05:00
Jimmy Brisson 81437732dd Merge pull request #4945 from maciejbocianski/mail_tests
Extends test set for Mail class
2017-09-05 11:16:27 -05:00
Filip Jagodzinski 33e38cc0d2 Tests: RTOS: RtosTimer: Add tests 2017-09-04 16:10:54 +02:00
Maciej Bocianski ae0b90f440 Extends test set for Mail class 2017-08-31 15:04:36 +02:00
Laurent MEUNIER be7fa925ad TESTS: flashiap: Add condition to check error on unaligned access
In case the target supports a page size of 1 byte, i.e. is able to
program flash 1 byte at a time, which is the case of STM32 F4 targets,
there is no reason for flash_device.program to return an error when
trying to write on an "unaligned" address.
2017-08-28 16:21:18 +02:00
Bartek Szatkowski b0ad73ea41 RTOS: Changes to the EvenFlags API, doxy and tests 2017-08-15 13:33:32 +01:00
YarivCol dfbcbddd9a RTOS: add tests for EvenFlags class 2017-08-15 13:27:30 +01:00
Christopher Haster 4cad764162 Added copyright header to all tests 2017-08-07 12:02:33 -05:00
Jimmy Brisson a81783e177 Merge pull request #4752 from bulislaw/queue_tests
RTOS: Queue tests & docs rework
2017-08-07 10:27:11 -05:00
Jimmy Brisson 294d7e7b41 Merge pull request #4690 from 0xc0170/us_ticker_test
test: add us ticker test
2017-08-07 10:26:54 -05:00
Jimmy Brisson c5c470e22c Merge pull request #4729 from bulislaw/mutex_tests
RTOS: Mutex: Rework tests
2017-07-27 09:40:26 -05:00
Martin Kojtal ae51f183c6 test: add hal ticker test (us + lp tickers)
This test exercises ticker API
- init should be executed just once
- read timestamp

Set interrupt should be tested via upper layer, as it does not provide
API to change handler that is invoked in the ISR ticker handler.
2017-07-26 17:05:51 +01:00
Marcus Chang 299c7f24ac mbed-hal: Fixed flash test
The test assumed that data written to flash would be memory mapped
and directly accessible. On some platform this is not the case
and data has to read back through an explicit read command.

The test has been changed to use the flash read command instead
of direct memory access.
2017-07-19 14:32:39 +01:00
Jimmy Brisson 160940b30e Merge pull request #4682 from bulislaw/sem_tests
Test: RTOS: Semaphore: Rework tests
2017-07-17 11:06:48 -05:00
Jimmy Brisson adfed0f9de Merge pull request #4644 from 0xc0170/fix_ticker_delta_negative
Ticker: add fire interrupt now function
2017-07-17 11:05:46 -05:00
Jimmy Brisson 18bb6fdc1f Merge pull request #4620 from bulislaw/thread_tests
Extend tests for RTOS Thread class
2017-07-17 11:03:34 -05:00
Martin Kojtal 5a5d159a3c Merge pull request #4666 from chrissnow/tests-mbed_hal-flash-Timing_fix
Fix timing issues found in "Flash - clock and cache test"
2017-07-13 16:48:32 +02:00
Martin Kojtal 56cb1582be ticker test: add test for set interrupt with timestamp in the past
2 test cases added, one for event in the past, one for event in future but very close
to the current time, thus once is set, it is already in the past, and we fire
interrupt immediately.
2017-07-13 12:23:25 +01:00
Martin Kojtal 4ff432904e ticker test: add fire now stub 2017-07-13 12:23:25 +01:00
Bartek Szatkowski fccfa7e2c0 Tests: RTOS: Queue: Rework and extend tests 2017-07-12 15:39:54 +01:00
Bartek Szatkowski 01c0cfd4f8 RTOS: Mutex: Rework tests
Add descriptions, fix small issues and timings.
2017-07-12 11:02:12 +01:00
Bartek Szatkowski 739a429820 Test: RTOS: Semaphore: Rework tests 2017-07-11 15:01:39 +01:00
Jimmy Brisson 50fdca88e8 Merge pull request #4599 from studavekar/timing_tests_update
Update timing tests to be robust
2017-07-07 16:22:09 -05:00
Shrikant Tudavekar 8a4dbff8d6 validate base_time key received
This is required as greentea can send multiple __sync packets and cause the
to be in unexpected state.
2017-07-05 12:37:41 -05:00
Chris 8365d9d00d Remove volatile 2017-06-30 22:44:05 +01:00
Chris ed8b378c6e Code tidy 2017-06-30 22:09:47 +01:00
Chris 562a548053 Assembly based loop for timing test 2017-06-30 20:33:58 +01:00
Bartek Szatkowski 60e7ef2ab7 RTOS: Thread: Rework and extend test suite 2017-06-29 13:04:13 +01:00
Chris 92e4a1faf7 Fix timing issues found in "Flash - clock and cache test"
ARMCC seemed to be inlining time_cpu_cycles() but with a different number of clock cycles in the loop, GCC worked fine.
2017-06-29 09:51:44 +01:00
Russ Butler f535cb5ddc Update timing calculations 2017-06-28 16:29:38 -05:00
Shrikant Tudavekar 73907259d9 Increased stack to 1024 from 768 and corrected assert.
1) mbed-os-tests-mbedmicro-rtos-mbed-basic tests use to fail when run in loop
after 20-25, This was because the stack used by test application was in range of
744-840 bytes. So bumped the stack size to 1024 bytes.

2) Corrected the assert and taken out the assert which was not required.
2017-06-22 18:25:39 -05:00
studavekar 12fe3415bc Deprecate testcases related to time drift.
1) RtosTimer is been Deprecated by EventQueue.
2) wait_us testing can't be reliably tested.
2017-06-22 18:25:38 -05:00
studavekar 0f55193df8 Update timing tests to be robust.
In the new approach the host controls the device activity when the test
should start, finish and pass/fail status is send to device. Also deprecate
the test cases which can't accurately test.
2017-06-22 18:25:16 -05:00
adustm 8ea9ca0af9 Add test of sha256_clone function 2017-06-16 10:47:45 +02:00
adustm 021b84a140 Handle context swapping + rename macro ST_SHA256_BLOCK_SIZE
Handle 64 bytes accumulation
2017-06-16 10:47:31 +02:00
Sam Grove cfc4159c3f Merge pull request #4490 from pan-/reintroduce_ticker_test
tests: Reintroduce ticker test.
2017-06-11 01:09:24 -05:00
Russ Butler adcd2928fe Fix mktime test DST error
Initialize all values of timeinfo in make_time_info. This prevents
the field 'tm_isdst' from getting inadvertently set to 1 causing
time to be off by 1 hour.
2017-06-09 16:29:24 -05:00
Russ Butler d6af53c3ab Limit mktime test range for IAR
Do not test mktime or localtime past the year 1935 for IAR since this
is out of their supported range.
2017-06-09 16:26:17 -05:00
Vincent Coubard 6b020a3510 mbed_localtime: Add support of year day.
This field is needed by the LPC43XX targets.
2017-06-08 10:32:57 +01:00
Vincent Coubard 946ed353bc mbed_mktime: Improve documentation for doxygen. 2017-06-08 10:01:43 +01:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -05:00
Vincent Coubard 7a8898bb21 tests: Reintroduce ticker test.
This test was removed because of its memory footprint.
Most of the memory consummed by the test itself was related to the instantion of test cases in RAM.

With the introduction of case_t which allows tests cases to live in FLASH, the memory footprint has been drastically reduced (860 bytes of RAM saved) and the ticker test can be reintroduced in the code base.
2017-06-07 10:59:23 +01:00
Russ Butler ee2be3f90c Ignore deprecated storage test
Add a .mbedignore to the storage_abstraction test since this is
deprecated.
2017-06-02 23:50:39 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Martin Kojtal 3e0cdb966c tests: remove ticker test
This is temporary, as this test does not fit to some 16kB RAM devices. This requires few more steps: some small devices are using big async HAL structures, RTX changes increased the RAM footprint, plus this test seems to be too big. With all these, it won't fit in RAM regions for some devices.
2017-06-02 09:26:39 +01:00
Sam Grove fa0cd205a2 Merge pull request #4094 from pan-/fix_hal_ticker
[HAL] Add support for 64 bit us timestamp
2017-06-01 23:25:26 -05:00
Vincent Coubard c6433b018a lp ticker test: Fix timestamp update during deepsleep test. 2017-06-01 16:31:48 +01:00
Vincent Coubard 3e24e8fa62 lp_ticker test: Capture completion time at completion point. 2017-05-31 19:13:10 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Anna Bridge 1a37ea608a Merge pull request #4393 from 0xc0170/fix_race_test_single
race tests: fix unsupported condition
2017-05-30 16:59:01 +01:00
Sam Grove 58e88813a9 Merge pull request #4282 from kl-cruz/FlashAPI_nRF52840
Flash api nRF52840
2017-05-26 10:31:05 -05:00
Martin Kojtal 7aea3bc43e race tests: fix unsupported condition
Should be true if single thread is defined, then its not
supported.
2017-05-25 14:47:28 +01:00
Vincent Coubard 834a302664 ticker test: Fix data scope dependency. 2017-05-23 11:14:10 +01:00
Vincent Coubard fe2144f7ec ticker tests: optimize RAM usage. 2017-05-22 12:07:12 +01:00
Vincent Coubard 4adba7caff ticker test: fix code format. 2017-05-17 18:55:53 +01:00
Martin Kojtal 8f295177ce Merge pull request #4317 from c1728p9/reduce_test_overhead
Reduce test overhead in preperation for CMSIS 5
2017-05-17 10:13:25 +01:00
kl-cruz 4bb818cd97 nRF52840: Fixed flashapi test and casting issue 2017-05-17 09:21:39 +02:00
Bartek Szatkowski 07fc7aeb89 Remove deprecated Thread constructor usage 2017-05-16 10:54:30 +01:00
Vincent Coubard ab09a1722f ticker api: Schedule immediately event in the past. 2017-05-16 10:37:35 +01:00
Vincent Coubard aeffd738c7 ticker_api: Code clarification
* update_interrupt renamed into schedule_interrupt
* update_current_timestamp renamed into update_present_time
* ticker_event_queue_t::timestamp renamed into
* ticker_event_queue_t::present_time
* Fix doxygen comments in ticker_api.h
* Update comments internal comments in mbed_ticker_api.c
2017-05-16 10:37:35 +01:00
Vincent Coubard b1f3aa76bb [HAL] Add Tests for the hal ticker API. 2017-05-16 10:35:11 +01:00
Bartek Szatkowski 6a0fcd3c58 Reduce test overhead in preparation for CMSIS 5
Reduce RAM consumption so all tests can still be built when using
CMSIS/RTX5. Also reduce clutter by removing the per target stack size
defines in the tests.
2017-05-14 19:25:19 -05:00
Christopher Haster f98a52fb97 Fixed timeout units in events timing test
A units mistake led to passing 20000 seconds instead of 20000 milliseconds
to greentea. The would cause the test to spin for 6 hours if it got stuck
anywhere.
2017-05-12 15:07:48 -05:00
Martin Kojtal 84eddd01c1 tests: race test - add not supported for single threaded env
Fixes #4196. As someone might not be aware that settting default_lib to small has
some implications regarding thread safety, therefore we print an error.
2017-04-20 10:53:01 +01:00
ccli8 bcae1429e5 [Greentea] Fix test code mbed-os-tests-mbed_hal-flash 2017-03-20 15:06:06 +08:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
0xc0170 2fa2927ab5 tests: add FlashIAP functional test
It currently tests functionality provided by flash IAP API like
read/program/erase and getters.
2017-02-21 14:08:56 -06:00
0xc0170 4d55719321 test: add flash functional tests for flash HAL
Add tests to verify the hal port of the flash_api.
2017-02-21 14:08:23 -06:00
Sam Grove bce720d756 Merge pull request #3786 from bulislaw/feature_rework_rtos_tests
Rework RTOS mutex tests
2017-02-21 10:57:08 -06:00
Sam Grove 4103842b2b Merge pull request #3782 from geky/events-callback-inference
events: Add support for infering event type from Callback objects
2017-02-21 10:53:14 -06:00
Christopher Haster 6e920fdfe9 events: Increased test tolerance to +-5ms 2017-02-16 13:26:59 -06:00
Bartek Szatkowski 9377fa97c9 Rework RTOS mutex tests 2017-02-16 14:07:26 +00:00
Christopher Haster 99ca88a66a events: Added support for infering event type from Callback objects
While limitations in type inference prevent the event helper from
infering the type of generic function objects, there is nothing
technical preventing inference from the Callback class, where the
function type is encoded in the template parameters.

With adoption of the Callback class as the standard function
representation, it makes sense to support events created from
callback objects.
2017-02-15 13:43:52 -06:00
Christopher Haster 1f9e239a7d events: Added equeue platform timing tests
Tests the timer/semaphores at a lower level than the event queue,
which removes a layer of concerns from issues in the rtos timing.
2017-02-15 10:59:46 -06:00
Bartek Szatkowski ed41ebef9b Fix deprecated Thread ctor usage in RTOS tests
Thread spawning constructors are deprecated, start function should be
used instead.
2016-12-23 13:16:11 +00:00
Brian Daniels 3880e3a39d Limiting the thread stack for parallel threads test
Previously, the RTOS threads test was conditionally change the thread
stack size for all test cases based on the target. Now, it uses the
default stack size for all targets when threads are created serially,
and uses a 512 byte stack for the threads that are created in parallel.
2016-12-20 17:14:04 -06:00
Russ Butler 92d11df19d Increase stack size in malloc test for Cortex-A
Increase the stack size used in the malloc test to prevent stack
overflows on Cortex-A devices.
2016-12-03 14:21:17 -06:00
Martin Kojtal ab2e869a24 Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32
[Silicon Labs] Adding support for EFR32MG1 wireless SoC
2016-12-02 15:46:35 +01:00
Martin Kojtal 464f04c6ba Merge pull request #3147 from bulislaw/wifi_test
Add new WiFi tests
2016-11-24 17:45:37 +00:00
Bartek Szatkowski 3c06cdae7e WiFi tests: Make tests CI friendly 2016-11-10 17:03:26 +00:00
Bartek Szatkowski e116a66270 WiFi test Add support for mbed_app.json 2016-11-10 10:15:44 +00:00
Bartek Szatkowski e8b55cac46 WiFi tests: Only support Odin board 2016-11-10 10:04:46 +00:00