Commit Graph

145 Commits (8624fdf0a75dad0b1310606df72cb95c97c00adf)

Author SHA1 Message Date
Filip Jagodzinski 5840281682 ROTS: SysTimer: Fix test timing issues
Use a busy loop with non-blocking Semaphore::wait(0) calls instead of a
single Semaphore::wait(osWaitForever) to improve time measurement
accuracy. Looping in Semaphore::wait(0) prevents the board from entering
sleep or deepsleep modes while waiting for the semaphore. By skipping
the overhead wakeup time, we get more accurate timings.
2019-01-18 17:10:39 +01:00
Oren Cohen 870bebc9ac fix mbedmicro-rtos-mbed tests 2018-12-05 19:59:54 +02:00
Cruz Monrreal 5ed07c2dd4
Merge pull request #8328 from kjbracey-arm/noreturn
Error path tightening: use MBED_NORETURN; add+use core_util_atomic_flag
2018-10-29 20:49:54 -05:00
Kevin Bracey 1397eb5110 Disable RTOS error tests if error traps are enabled
It will be too hard to try to intercept and continue from a trapped
error once error functions are marked [[noreturn]], so make the error
return tests conditional on error trapping being disabled.
2018-10-29 11:56:17 +02:00
Martin Kojtal bbfa322afb tests: fix astyle 2018-10-25 09:58:17 +01: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 f35975c782
Merge pull request #7926 from jamesbeyond/fm_test
Increase the timeout for rtostimer test to 10s
2018-09-27 10:20:30 -05:00
Cruz Monrreal 4403a561b3
Merge pull request #7890 from deepikabhavnani/cb_issue_7701
Circular buffer should use conditional statement instead of modulo
2018-09-27 10:20:05 -05:00
Anna Bridge c2fdc0d972
Merge pull request #7423 from mprse/mutex_lock_assert
Fix issue #6872 - Mutex lock has possibility to fail at runtime (returning status flag)
2018-09-03 14:14:24 +01:00
Cruz Monrreal 48232be98e
Merge pull request #7872 from kjbracey-arm/thisthread
Add ThisThread namespace and deprecate static Thread methods
2018-09-02 15:10:18 -05:00
Cruz Monrreal 00b7700be2
Merge pull request #7875 from c1728p9/feature_CMSIS_5_0b521765
Update CMSIS to 5.4.0
2018-08-31 11:31:37 -05:00
Qinghao Shi b98bd91a98 increase timeout for rtostimer test to 10s 2018-08-29 13:07:42 +01:00
Kevin Bracey 1330eeecd0 Add ThisThread 2018-08-28 13:25:17 +03:00
Deepika 4e263b17b9 Refactor circular buffer test to platform folder 2018-08-27 09:33:07 -05:00
Martin Kojtal a24cecfc94
Merge pull request #7805 from jamesbeyond/fm_test
Skip Greentea tests for Mbed OS code coverage on Fast Models
2018-08-27 10:39:43 +02:00
Przemyslaw Stekiel 6a5062c5e3 Adapt `tests-mbedmicro-rtos-mbed-mutex` test - use new void unlock(void) function 2018-08-27 08:50:00 +02:00
Przemyslaw Stekiel f65bba9a23 Adapt `tests-mbedmicro-rtos-mbed-mutex` test - use new lock(void) function instead of deprecated one. 2018-08-27 08:48:59 +02:00
Russ Butler c3f5b64b79 Remove double free RTOS tests
Remove the double free RTOS tests since this was never defined
behavior of CMSIS-RTOS. This allows testing to pass.

The RTX commit which caused this test to start failing is:
c3b123ef4256f65537e2597af475fc20ec9a383e
RTX5: updated MemoryPoolFree (removed count check) [SDCMSIS-801]

Note - Double freeing an element from a memory pool was never safe.
The error return value when double freeing was misleading since memory
corruption may still be occurring in that case. For more information
on this see SDCMSIS-801.
2018-08-26 12:54:32 -05:00
Qinghao Shi c9ac4868ac move test skipping macro for FastModels to top of the test 2018-08-23 22:30:55 +01:00
Cruz Monrreal e530939f47
Merge pull request #7744 from davidsaada/david_threads_test_fix
RTOS threads test: Handle out of memory cases
2018-08-23 10:08:39 -05:00
Qinghao Shi 3c302d9d9b Increase the thread stack size on FastModel targets
The thread stack size was restricted due to some boards have really limited RAM sizes,
and out of heap memory on multiple threads tests.
The side effect was on the debug profile build, the tests will get stack overflow.
We need the build the test with debug profile in order to do the code coverage analysis.
So increased the thread stack size on FastModel targets.
2018-08-17 17:46:29 +01:00
Qinghao Shi 891c4ed244 Skip time drifting test on FastModels targets
FastModels targets are simulator running on the x86 hosts.
As the nature of non-RealTime x86 OS and FastModels, timing accuracy is not guaranteed
So skipping the time drifting tests on FastModel targets
2018-08-17 17:46:28 +01:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
David Saada 75bc3d36cc RTOS threads test: Handle out of memory cases 2018-08-09 17:32:48 +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
Przemyslaw Stekiel 6eb66ccd7a TESTS-MBEDMICRO-RTOS-MBED-SYSTIMER: include ticker_free() function in the ticker interface. 2018-08-02 09:48:36 +02:00
Cruz Monrreal a252e5ed96
Merge pull request #7530 from jeromecoutant/PR_RTOS_TICKLESS
RTOS SYSTIMER test error in TICKLESS mode
2018-07-23 10:13:50 -05:00
jeromecoutant 2550f3d09e Systimer test : compilation error with MBED_TICKLESS
Issue occurs when "MBED_TICKLESS" is added in mbed_app.json,
not when "MBED_TICKLESS" is added in targets.json
2018-07-19 15:50:16 +02:00
ccli8 43b98cf405 Fix Greentea test code with Cortex-M23/M33
Enlarge stack size of forked thread for Cortex-M23/M33 targets
2018-07-12 18:01:27 +08:00
Cruz Monrreal 93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Maciej Bocianski cc6f4c5a66 add kernel ticker test 2018-07-02 13:48:06 +02:00
Martin Kojtal df821aa483 test: fix thread storage size 2018-06-28 15:12:24 +01:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
Przemyslaw Stekiel 7227670416 Skip higher level ticker tests for targets with stale ticker target specific drivers.
Since target specific ticker drivers are not ready also features which uses ticker in upper layers may not work correctly and tests for these features.
We need to disable also failing higher level ticker related tests (by adding check if DEVICE_USTICKER symbol is available and raise #error [NOT_SUPPORTED] if not).
2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel 2b7d7a822b tests-mbedmicro-rtos-mbed-systimer: execute sleep/deepsleep test cases only when SLEEP support is enabled. 2018-05-25 12:04:32 -05:00
Senthil Ramakrishnan 147d9cac4e Test application/cases optimization for some low memory targets, macro changes and test fixes 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan f9c25612ae Fix test failures when trap errors are enabled and other fixes 2018-05-23 12:21:10 -05: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
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
Deepika 0b9f301268 Test to verify peek API 2018-03-09 16:47:48 -06:00
Filip Jagodzinski 74e0f95cd6 RTOS: SysTimer: Add tests 2018-02-28 14:37:13 +01: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
Martin Kojtal b89cf3ff75
Merge pull request #5578 from mprse/CircularBuffer_tests
CircularBuffer class modification and test
2017-12-20 14:51:44 +00:00
Przemyslaw Stekiel a488424d26 Add CircularBuffer test. 2017-11-29 11:26:36 +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
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