Commit 99348f65 authored by Committed by Jan KiszkaBrowse files
testsuite/smokey: posix_clock: prevent false positive in time-dependent test
clock_decrease_after_periodic_timer_first_tick checks that periodic interval timers based on CLOCK_REALTIME are not (pathologically) affected by the epoch going backwards. To this end, we measure the actual time observed between two ticks of a periodic timer based on CLOCK_REALTIME with a call to clock_settime() injecting a negative offset in between, equivalent to five ticks. Due to processing delays induced by clock_settime() and other latency, we could observe a duration which exceeds a tick by a few tenths of microseconds. Since we can't anticipate the amount of latency involved, let's accept a longer delay of at most two ticks. This is still correct from the standpoint of the test, which verifies that no correlation exists between the clock offset injected by clock_settime() and the delay until the next tick generated by the affected clock. Signed-off-by: Philippe Gerum <firstname.lastname@example.org> Signed-off-by: Jan Kiszka <jan.ki...
Showing with 1 addition and 1 deletion