- 26 9月, 2017 2 次提交
-
-
由 Shuah Khan 提交于
When timer_create() fails on a bootime or realtime clock, setup_timer() returns 0 as if timer has been set. Callers wait forever for the timer to expire. This hang is seen on a system that doesn't have support for: CLOCK_REALTIME_ALARM ABSTIME missing CAP_WAKE_ALARM? : [UNSUPPORTED] Test hangs waiting for a timer that hasn't been set to expire. Fix setup_timer() to return 1, add handling in callers to detect the unsupported case and return 0 without waiting to not fail the test. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
由 Shuah Khan 提交于
do_timer_oneshot() uses select() as a timer with FD_SETSIZE and readfs is cleared with FD_ZERO without FD_SET. When stdout and stderr are redirected, the test hangs in select forever. Fix the problem calling select() with readfds empty and nfds zero. This is sufficient for using select() for timer. With this fix "./set-timer-lat > /dev/null 2>&1" no longer hangs. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Acked-by: NGreg Hackmann <ghackmann@google.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 23 8月, 2017 1 次提交
-
-
由 Shuah Khan 提交于
There is no need to keep timers tests in sync with external timers repo. Drop support for !KTEST to support for building and running timers tests without kselftest framework. Reference: https://lkml.org/lkml/2017/8/10/952Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Acked-by: NJohn Stultz <john.stultz@linaro.org>
-
- 18 8月, 2017 2 次提交
-
-
由 Greg Hackmann 提交于
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: NGreg Hackmann <ghackmann@google.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
由 Greg Hackmann 提交于
Rather than printing an error inside the alarm signal handler, set a flag that we check later. This keeps the test from spamming the console every time the alarm fires early. It also fixes the test exiting with error code 0 if this was the only test failure. 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: NGreg Hackmann <ghackmann@google.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
- 03 4月, 2015 1 次提交
-
-
由 John Stultz 提交于
The set-timer-lat test fails when testing CLOCK_BOOTTIME_ALARM or CLOCK_REALTIME_ALARM when the user isn't running as root or with CAP_WAKE_ALARM. So this patch improves the error checking so we report the issue more clearly and continue rather then reporting a failure. 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: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 01 4月, 2015 1 次提交
-
-
由 John Stultz 提交于
For the default run_timers target, the timers tests takes the majority of kselftests runtime. So this patch reduces the default runtime for inconsistentcy-check and set-timer-lat, which reduced the runtime almost in half. Before: 11m48.629s After: 6m47.723s 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: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-
- 13 3月, 2015 1 次提交
-
-
由 John Stultz 提交于
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: NJohn Stultz <john.stultz@linaro.org> Tested-by: NPrarit Bhargava <prarit@redhat.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
-