aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/timers/Makefile (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-07-13Merge tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linuxLinus Torvalds1-1/+1
Pull RTC updates from Alexandre Belloni: "Here is the pull-request for the RTC subsystem for 4.13. Subsystem: - expose non volatile RAM using nvmem instead of open coding in many drivers. Unfortunately, this option has to be enabled by default to not break existing users. - rtctest can now test for cutoff dates, showing when an RTC will start failing to properly save time and date. - new RTC registration functions to remove race conditions in drivers Newly supported RTCs: - Broadcom STB wake-timer - Epson RX8130CE - Maxim IC DS1308 - STMicroelectronics STM32H7 Drivers: - ds1307: use regmap, use nvmem, more cleanups - ds3232: temperature reading support - gemini: renamed to ftrtc010 - m41t80: use CCF to expose the clock - rv8803: use nvmem - s3c: many cleanups - st-lpc: fix y2106 bug" * tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (51 commits) rtc: Remove wrong deprecation comment nvmem: include linux/err.h from header rtc: st-lpc: make it robust against y2038/2106 bug rtc: rtctest: add check for problematic dates tools: timer: add rtctest_setdate rtc: ds1307: remove ds1307_remove rtc: ds1307: use generic nvmem rtc: ds1307: switch to rtc_register_device rtc: rv8803: remove rv8803_remove rtc: rv8803: use generic nvmem support rtc: rv8803: switch to rtc_register_device rtc: add generic nvmem support rtc: at91rm9200: remove race condition rtc: introduce new registration method rtc: class separate id allocation from registration rtc: class separate device allocation from registration rtc: stm32: add STM32H7 RTC support dt-bindings: rtc: stm32: add support for STM32H7 rtc: ds1307: add ds1308 variant rtc: ds3232: add temperature support ...
2017-07-09tools: timer: add rtctest_setdateBenjamin Gaignard1-1/+1
This tool allow to set directly the time and date to a RTC device. Unlike other tools isn't doens't use "struct timeval" or "time_t" so it is safe for 32bits platforms when testing for y2038/2106 bug. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-06-20kselftests: timers: Add test for frequency stepMiroslav Lichvar1-2/+3
This test checks the response of the system clock to frequency steps made with adjtimex(). The frequency error and stability of the CLOCK_MONOTONIC clock relative to the CLOCK_MONOTONIC_RAW clock is measured in two intervals following the step. The test fails if values from the second interval exceed specified limits. 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> Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
2017-03-24selftests/timers: Spelling s/privledges/privileges/Geert Uytterhoeven1-2/+2
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-05selftests: remove CROSS_COMPILE in dedicated Makefilebamvor.zhangjian@huawei.com1-1/+0
After previous clean up patches, memfd and timers could get CROSS_COMPILE from tools/testing/selftest/lib.mk. There is no need to preserve these definition. So, this patch remove them. Acked-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-01-05selftests: remove duplicated all and clean targetbamvor.zhangjian@huawei.com1-7/+2
Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to indicate the test program, extended test program and test files. It is easy to understand the purpose of these files. But mix of compiled and uncompiled files lead to duplicated "all" and "clean" targets. In order to remove the duplicated targets, introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled objects. Also, the later patch will make use of TEST_GEN_XXX to redirect these files to output directory indicated by KBUILD_OUTPUT or O. And add this changes to "Contributing new tests(details)" of Documentation/kselftest.txt. Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-06-02kselftests: timers: Add set-tz test caseJohn Stultz1-1/+2
Mika Westerberg reported a erroneous change in the error checking of settimeofday, so I wanted to add a test to ensure we don't trip over this again. Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Baolin Wang <baolin.wang@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Prarit Bhargava <prarit@redhat.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-10-12timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustmentsJohn Stultz1-1/+2
Recently a kernel side NTP bug was fixed via the following commit: 2619d7e9c92d ("time: Fix timekeeping_freqadjust()'s incorrect use of abs() instead of abs64()") When the bug was reported it was difficult to detect, except by tweaking the adjtimex tick value, and noticing how quickly the adjustment took: https://lkml.org/lkml/2015/9/1/488 Thus this patch introduces a new test which manipulates the adjtimex tick value and validates that the results are what we expect. Signed-off-by: John Stultz <john.stultz@linaro.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Miroslav Lichvar <mlichvar@redhat.com> Cc: Nuno Gonçalves <nunojpg@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1444094217-20258-1-git-send-email-john.stultz@linaro.org [ Tidied up the code and the changelog a bit. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-24Documentation, split up rtc.txt into documentation and test filePrarit Bhargava1-1/+1
This patch splits rtc.txt into two separate files, one for the documentation itself, and the other for the rtctest.c file. The rtctest file is moved into the kernel tools/testing/selftests/timers directory. This will make automated testing easier. Note that the only difference in the rtc.txt file is that the location of the rtctest.c file has changed. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: John Stultz <john.stultz@linaro.org> Cc: corbet@lwn.net Cc: rtc-linux@googlegroups.com Cc: linux-doc@vger.kernel.org Cc: a.zummo@towertech.it Cc: prarit@redhat.com Cc: john.stultz@linaro.org Cc: shuahkh@osg.samsung.com Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-19selftests/timers: Use shared logic to run and install testsMichael Ellerman1-15/+12
Change the timers Makefile to make use of shared run and install logic in lib.mk. Destructive tests are installed but not run by default. Add a new variable, TEST_PROGS_EXTENDED, which is a list of extra programs to install, but which are not run by the default run_tests logic. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add set-2038 test from timetest suiteJohn Stultz1-1/+2
Adds the set-2038 test which sets the time to near-edge cases like the start and end of the 32 bit epoch and checks that time behaves properly. There is also a dangerous mode, which lets the clock roll over past 2038 on 32bit systems, which on some older kernels will cause system hangs. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add set-tai from the timetest suiteJohn Stultz1-1/+2
This patch adds the set-tai test which ensures the tai offset can be set properly from adjtimex. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add leapcrash test from the timetest suiteJohn Stultz1-1/+2
This change adds the leapcrash test which tests to see if a leapsecond deadlock which was observed from 2.6.26 to 3.3 is present on this system. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add leap-a-day test from timetest suiteJohn Stultz1-0/+2
This change adds the leap-a-day test which sets STA_INS and STA_DEL each day to trigger leapseconds each day. It also has a mode to jump the time to right before the end of the day each iteration. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add clocksource-switch test from timetest suiteJohn Stultz1-1/+2
Adds the clocksource-switch tests which continually switches the current clocksource between all the available ones, watching for any timekeeping inconsistencies. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add skew_consistency test from the timetests suiteJohn Stultz1-1/+2
This change adds the skew_consistency test, which twists the ADJ_FREQUENCY knob back and forth and watches for timekeeping inconsistencies. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add change_skew test from timetest suiteJohn Stultz1-1/+2
This patch adds the change_skew test which validates the adjtimex freq can be set to various values and then using the inconsistency-check, raw_skew, and nanosleep tests ensures time behaves properly. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add alarmtimer-suspend test from timetests suiteJohn Stultz1-2/+4
This adds the alarmtimer-suspend test from the timetests suite, which tests that the alarmtimers wake the system up from suspend shortly after the time they were set to fire. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add adjtimex validation test from timetest suiteJohn Stultz1-1/+10
This adds a adjtimex validation test which checks the behavior for a set of valida and invalid inputs. So far this only tests ADJ_FREQUENCY, but hopefully will grow. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add mqueue latency test from the timetest suiteJohn Stultz1-1/+2
Add test to validate mqueue timeout latency from the timetest suite Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add threaded time inconsistency test from timetest suiteJohn Stultz1-2/+2
Add the threaded time inconsistency test from the timetest suite. This checks for time inconsistencies between cpus, usually associated with clock skew as sometimes found w/ TSCs. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add set-timer-lat test from timetest suiteJohn Stultz1-1/+4
Add my set-timer-lat test from the timetest suite. This test checks the latency from set_timer and reports if any are unreasonable (>40ms). Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add clock skew estimation test from timetest suiteJohn Stultz1-1/+2
This adds my clock skew estimation test from the timetest suite. It measures the drift between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW and compares it with the current frequency value from adjtimex. It sometimes can trigger false failures when ntpd isn't in a steady state, but its a useful too when doing adjtimex testing. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add nsleep-lat test from timetest suiteJohn Stultz1-1/+2
Adds my nanosleep latency test from the timetest suite. This checks to make sure we don't see "unreasonable" latencies (> 40ms) when calling nanosleep. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add inconsistency-check test from timetestsJohn Stultz1-2/+2
This adds my inconsistency-test from my timetests suite, which checks for (single threaded) time inconsistencies across the various clockids. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Add nanosleep test from timetest suiteJohn Stultz1-1/+2
Add my basic nanosleep test from my timetest suite. This test validates that nanosleep doesn't return early against a number of clockids. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-12selftests/timers: Cleanup Makefile to make it easier to add future testsJohn Stultz1-3/+8
Try to streamline the makefile so its easier to add timer/timekeeping tests. Also adds support for the CROSS_COMPILE variable. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2013-07-03selftests: add basic posix timers selftestsFrederic Weisbecker1-0/+8
Add some initial basic tests on a few posix timers interface such as setitimer() and timer_settime(). These simply check that expiration happens in a reasonable timeframe after expected elapsed clock time (user time, user + system time, real time, ...). This is helpful for finding basic breakages while hacking on this subsystem. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Olivier Langlois <olivier@trillion01.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>