1Title: Timer Starvation test
2
3The purpose of the test is to detect whether the timer implementation
4correctly handles situations where only one timeout is present, and that
5timeout is repeatedly rescheduled before it has a chance to fire.  In
6some implementations this may prevent the timer interrupt handler from
7ever being invoked, which in turn prevents an announcement of ticks.
8Lack of tick announcement propagates into a monotonic increase in the
9value returned by sys_clock_elapsed().
10
11This test is not run in automatic test suites because it generally takes
12minutes, hours, or days to fail, depending on the hardware clock rate
13and the tick rate.  By default the test passes if one hour passes
14without detecting a failure.
15
16Failure will occur when some counter wraps around.  This may be a
17hardware timer counter, a timer driver internal calculation of
18unannounced cycles, or the Zephyr measurement of unannounced ticks.
19
20For example a system that uses a 32768-Hz internal timer counter with
2124-bit resolution and determines elapsed time by a 24-bit unsigned
22difference between the current and last-recorded counter value will fail
23at 512 s when the updated counter value is observed to be less than the
24last recorded counter.
25
26Systems that use a 32-bit counter of 80 MHz ticks would fail after
2753.687 s.
28