kselftests: timers: set-timer-lat: Add one-shot timer test cases
authorGreg Hackmann <ghackmann@google.com>
Tue, 25 Jul 2017 21:36:26 +0000 (14:36 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Aug 2017 19:14:58 +0000 (12:14 -0700)
commit28be3f8f48cfb3cf024860f042d424cd4824f5f7
tree47d9c085f9218d2cce26962ed724a10445cdca0e
parenta524b1184b8e86141d689fa78ad150fbf2db9b4c
kselftests: timers: set-timer-lat: Add one-shot timer test cases

These testcases are motivated by a recent alarmtimer regression, which
caused one-shot CLOCK_{BOOTTIME,REALTIME}_ALARM timers to become
periodic timers.

The new testcases are very similar to the existing testcases for
repeating timers.  But rather than waiting for 5 alarms, they wait for 5
seconds and verify that the alarm fired exactly once.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
tools/testing/selftests/timers/set-timer-lat.c