Commit Graph

564 Commits (ae7bb17eafab2938434fcba3eca92c17765e1133)

Author SHA1 Message Date
Cruz Monrreal e02466a77a
Merge pull request #7524 from c1728p9/tickless_fix
Fixes for tickless and LPTICKER_DELAY_TICKS
2018-08-21 10:03:41 -05:00
Cruz Monrreal c10ad7f544
Merge pull request #7212 from davidsaada/david_flashiap_test_small_flash
FlashIAP & NVStore tests: Skip test if overwriting code in flash
2018-08-21 09:41:51 -05:00
Russ Butler 00b8e24446 Fix rollover handling in ticker frequency test
To handle timer rollovers the test tests-mbed_hal-common_tickers_freq
calls intf->set_interrupt(0). For this to work correctly the ticker
implementation must fire an interrupt on every rollover event though
intf->set_interrupt(0) was called only once. Whether an interrupt will
fire only once or multiple times is undefined behavior which
cannot be relied upon.

To avoid this undefined behavior this patch continually schedules an
interrupt and performs overflow detection on every read. This also
removes the possibility of race conditions due to overflowCounter
incrementing at the wrong time.
2018-08-17 11:59:01 -05:00
Russ Butler f68958df4e Fix tests to work with LPTICKER_DELAY_TICKS
Fix the HAL common_tickers and sleep tests so they work correctly when
the define LPTICKER_DELAY_TICKS is set.
2018-08-17 11:58:55 -05: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
Russ Butler 1bbf43ad38 Add test for ticker suspend and resume
Unit test the functions ticker_suspend and ticker_resume.
2018-08-17 09:29:40 -05:00
Cruz Monrreal 3c25b96441
Merge pull request #7786 from mikaleppanen/dns_repeat_to_ext
Moved ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT under mbed extended tests
2018-08-16 17:57:36 -05:00
David Saada 876b5f755b FlashIAP & NVStore tests: Skip test if overwriting code in flash. 2018-08-16 21:59:45 +03:00
Cruz Monrreal 3795d394e5
Merge pull request #7741 from mprse/disable_ticker_free_tests
tests-mbed_hal-common_tickers: disable ticker free test cases.
2018-08-16 09:07:09 -05:00
Nir Sonnenschein 2b8eb5ec0e
Merge pull request #7752 from maciejbocianski/timer_test_fix
tests-mbed_drivers-timer: change delay method
2018-08-14 19:42:43 +03:00
Mika Leppänen 199244cf9c Moved ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT under mbed extended tests
Test is giving problems in some networks. Could be that DNS server
is regarding repeated DNS enquiries on the test to be caused by
malfunctioning device.
2018-08-14 10:21:48 +03:00
Maciej Bocianski efe9e44208 tests-mbed_drivers-timer: change delay method 2018-08-10 09:52:07 +02:00
Przemyslaw Stekiel 20f3d87283 tests-mbed_hal-common_tickers: disable ticker free test cases.
This is solution to issue #7724.

Ticker free tests have been removed since ticker free function has been implemented only for CI boards.
Implementation for the remaining platforms will be done on feature branch feature-hal-ticker-free.
2018-08-09 14:27:05 +02:00
jeromecoutant f532159b61 Timeout tests : unstable result
RTX waits, such as sem.wait(N), delays for between N-1 and N cycles.
As lp_ticker is not so accurate as us_ticker,
sometines, wait is expiring just before the lp_timeout.
2018-08-09 10:13:17 +02:00
Martin Kojtal 5f3923250c crc test: manual fix cases
Leave as it is for readability
2018-08-03 11:24:31 +01:00
Martin Kojtal e52bb68f93 tests: astyle fix
All tests should comply to our coding standard now
2018-08-03 10:23:38 +01:00
Cruz Monrreal 8f7024a226
Merge pull request #7383 from davidsaada/david_flashiap_timing_test
FlashIAP: Add timing test
2018-08-02 23:08:54 -05:00
Cruz Monrreal ae40a09036
Merge pull request #7508 from mprse/ticker_free
Ticker free() - requirements, pseudo code, tests, implementation
2018-08-02 23:05:14 -05:00
David Saada 7cf5b3a008 FlashIAP: Add timing test 2018-08-02 18:39:07 +03:00
Przemyslaw Stekiel 2fe6b98922 tests-mbed_hal-common_tickers: use low level ticker API for time measuring.
In `ticker speed` test case execution time of ticker API functions is measured using Timer object. Test replaces original ticker handler for testing purposes, so test should not relay on higher level ticker based features(like Timer).
Use low level ticker API for time measuring.
2018-08-02 15:24:29 +02: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
Przemyslaw Stekiel 6874fde3d3 TESTS-MBED_DRIVERS-TIMER: include ticker_free() function in the ticker interface. 2018-08-02 09:48:36 +02:00
Martin Kojtal d5f70f0d21
Merge pull request #7465 from davidsaada/david_tests_not_enough_memory
Skip a few tests if not enough memory can be allocated for them
2018-08-01 15:03:45 +02:00
Mika Leppänen d35f5b08ec Removed device emac check from emac greentea tests
DEVICE_EMAC is defined only for boards with default Ethernet emac.
It is not defined for example for Realtek RTL8195AM board that
does not have Ethernet. Removed the check for device emac from emac
greentea tests.
2018-07-31 13:18:17 +03:00
Cruz Monrreal 5d4f636bb1
Merge pull request #7578 from VeijoPesonen/conn_failure_tolerance
Makes Greentea TCP test cases to timeout less in connection errors
2018-07-26 10:29:48 -05:00
Veijo Pesonen dd6ec037d7 Makes Greentea TCP test cases to timeout less in connection errors
Made to prevent timeout if a single test case fails. The goal is that
each test case might wait only half of the remaining time reserved for
running TCP test cases.
2018-07-26 09:39:04 +03:00
Przemyslaw Stekiel 239ce02142 tests-mbed_hal-common_tickers: add ticker_free() functional tests. 2018-07-25 08:54:51 +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 49fe946b74 Fix some targets fail to pass ticker overflow test
In mbed-os-tests-mbed_hal-common_tickers/Microsecond ticker overflow test, some targets
would fail to catch specified ticker value near overflow in time and so fail. This commit
alleviates the issue by checking ticker value range rather than one exact ticker value near
overflow.
2018-07-19 10:05:16 +08:00
Cruz Monrreal e9e1ff997d
Merge pull request #7302 from OpenNuvoton/nuvoton_m2351_v1.1
Support Nuvoton's NUMAKER_PFM_M2351 target
2018-07-18 08:49:55 -05:00
Jimmy Brisson e9d56092c4 Remove unused storage api test 2018-07-16 14:12:00 -05:00
David Saada a224ca764a Skip a few tests if not enough memory can be allocated for them. 2018-07-16 17:21:21 +03:00
Cruz Monrreal 56dd4bfb24
Merge pull request #7436 from deepikabhavnani/update_sys
Update stats to fetch Mbed OS version info
2018-07-14 06:29:22 -05:00
Cruz Monrreal def1ef2390
Merge pull request #7494 from mprse/lp_ticker_deep_sleep_delay_fix
tests-mbed_hal-lp_ticker: change implementation of the delay before deep-sleep.
2018-07-13 17:33:55 -05:00
Deepika b05d105493 Update stats to fetch Mbed OS version info 2018-07-13 11:58:49 -05:00
Przemyslaw Stekiel 832e8b3f36 tests-mbed_hal-lp_ticker: change implementation of the delay before deep-sleep.
Serial buffer must be flushed before entering deep sleep mode. In the test this is done by the additional delay which is implemented on the busy loop which decrements given value down to 0 (`void wait_cycles(volatile unsigned int cycles)`). This solution is not appropriate since it is very target specific and the cycles value has been already increased few times. Additionally very big number of loop cycles which is suitable for fast targets may take much longer on slower boards and results in test timeout.
It has been verified that 20ms is sufficient delay for the green-tea transmission. In this test we cannot simply use `wait_ms(20)` since this potentially may put board to sleep and wake up using lp ticker. The test re-initialzies the lp ticker(disables ticker interrupt) and this operation may break the schedule and time tracing by the upper layer. But we can use us ticker which is not affected by this test. The solution is to add a delay routine based on busy loop and us ticker only. This way are able to wait exactly 20 ms.
2018-07-12 13:29:13 +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
Przemyslaw Stekiel b1b4f6e2ad tests-mbed_drivers-lp_timer: change delay method
The test sometimes fails on NRF51_DK (test case: "Test: LowPowerTimer - time measurement 1 ms.") in morph tests.

The test verifies if LowPowerTimer class correctly counts elapsed time. Sometimes we got measured ~1600 us for delay 1000 us (delta 550 us).
The delay is performed using `wait_us()` function which for delays greater than or equal to 1 ms (our case) calls `Thread::wait((uint32_t)ms);`. This causes rescheduling and potentially can put board into sleep (deep sleep mode is disabled by `wait_us()`). For our test purposes we don't need rescheduling/sleep since this actions takes extra time and have influence on the time measurement accuracy.
The solution is to implement function for delay which is based on busy loop and uses us ticker. It has been verified that this solves the problem. With this fix when measurement of 1 ms is repeated 1000 times we got usually measured time equal to ~1080 us, and sometimes ~1300us (checked that this is caused by systick interrupt handling). Since this is test for drivers layer and the results are acceptable I decided to not disabling systick in the test).
2018-07-11 11:44:27 +02: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
Cruz Monrreal a2376f0d3b
Merge pull request #7342 from maciejbocianski/kernel_tick_count_test
Add kernel ticker test
2018-07-05 10:36:58 -05:00
Maciej Bocianski cc6f4c5a66 add kernel ticker test 2018-07-02 13:48:06 +02:00
Martin Kojtal dd332471a8 test: fix os tick linkage
os_tick header file is C only, mangling would cause problems here
2018-06-29 11:43:26 +01:00
Martin Kojtal fcadf0b4f7 tests: fix internal symbols from RTX
As we do not include rtx_lib header file anymore, these symbols are not available.
Use core util for if ISR is active. And for OS tick, pull in os_tick header file.
2018-06-29 11:43:25 +01:00
Martin Kojtal df821aa483 test: fix thread storage size 2018-06-28 15:12:24 +01:00
ccli8 b18f690b39 Fix Greentea test code
Mark mbed-os-tests-mbed_hal-common_tickers/time_cpu_cycles not in-lined.
Otherwise, time_cpu_cycles may be in-lined somewhere and takes different
CPU cycles on invocation.
2018-06-26 13:47:24 +08:00
Cruz Monrreal ea47342f81
Merge pull request #7214 from SenRamakri/sen_ErrorOptimAndConfig
Error handling configuration updates and Optimization for exception handling
2018-06-25 10:10:49 -05:00
Cruz Monrreal 1087c0a959
Merge pull request #7283 from juhaylinen/update-greentea-tests
Update Greentea netsocket and wifi tests
2018-06-21 10:05:26 -05:00
ccli8 9416a32636 Enlarge wait time for flushing serial buffer in Greentea test code
Original wait time is not enough for UART to flush out before deepsleep on some targets.
2018-06-21 15:55:14 +08:00
Juha Ylinen 3c32b3ada7 Update Greentea netsocket and wifi tests
Increase timeout for netsocket TCP and UDP tests. Old timeout
(240 seconds) was not enough for slower devices to complete the
tests.
Accept error codes NSAPI_ERROR_CONNECTION_TIMEOUT and
NSAPI_ERROR_NO_CONNECTION when running test wifi_connect_secure_fail
2018-06-21 09:01:15 +03:00