selftests: timers: Add leap-second timer edge testing to leap-a-day.c
authorJohn Stultz <john.stultz@linaro.org>
Thu, 11 Jun 2015 22:54:57 +0000 (15:54 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 12 Jun 2015 09:15:50 +0000 (11:15 +0200)
commit0c4a5fc95b1df42651a9b4c1f72d348b3d196ea0
tree9f06308a5f07ae7675219e46442132db70c9ef94
parent96efdcf2d080687e041b0353c604b708546689fd
selftests: timers: Add leap-second timer edge testing to leap-a-day.c

Prarit reported an issue w/ timers around the leapsecond, where a
timer set for Midnight UTC (00:00:00) might fire a second early right
before the leapsecond (23:59:60 - though it appears as a repeated
23:59:59) is applied.

So I've updated the leap-a-day.c test to integrate a similar test,
where we set a timer and check if it triggers at the right time, and
if the ntp state transition is managed properly.

Reported-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Reported-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1434063297-28657-6-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
tools/testing/selftests/timers/leap-a-day.c