mbed-os/TESTS/mbed_hal
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
..
critical_section Add tests for critical section HAL API 2018-01-24 10:14:06 +01:00
flash/functional_tests Increase clock tolerance in Flash HAL test 2018-01-11 13:44:51 -08:00
lp_ticker Test: deepsleep() API replacement 2017-10-05 16:43:57 +01:00
lp_us_tickers test: add hal ticker test (us + lp tickers) 2017-07-26 17:05:51 +01:00
rtc_time Add tests for extended RTC. 2017-12-05 07:53:41 +01:00
rtc_time_conv RTC time conversion test - reduce number of tested years in order to reduce test execution time. 2018-01-08 10:14:54 +01:00
sleep_manager test: add sleep manager tests 2017-09-07 15:35:07 +01:00
sleep_manager_racecondition sleep_manager_racecondition: fix for slow devices 2018-02-22 11:36:08 +01:00
ticker Increase ticker test time for slower devices 2017-10-05 11:57:35 -05:00