<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/timers/set-timer-lat.c, branch linux-5.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-09-25T16:09:07Z</updated>
<entry>
<title>selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms</title>
<updated>2017-09-25T16:09:07Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-09-21T19:05:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=eefd95e1f3d47b90dc768e9ebc77d390c4f34809'/>
<id>urn:sha1:eefd95e1f3d47b90dc768e9ebc77d390c4f34809</id>
<content type='text'>
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: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: timers: set-timer-lat: fix hang when std out/err are redirected</title>
<updated>2017-09-25T16:09:06Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-09-21T19:46:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01db7fbf5487505b887fbd6a03c51f2adc952196'/>
<id>urn:sha1:01db7fbf5487505b887fbd6a03c51f2adc952196</id>
<content type='text'>
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 &gt; /dev/null 2&gt;&amp;1" no longer hangs.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Acked-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2017-09-08T22:11:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-09-08T22:11:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6d6218976df142ba5594371f8dbd56650151c56f'/>
<id>urn:sha1:6d6218976df142ba5594371f8dbd56650151c56f</id>
<content type='text'>
Pull kselftest updates from Shuah Khan:

 - TAP13 framework API and converting tests to TAP13 continues. A few
   more tests are converted and kselftest common RUN_TESTS in lib.mk is
   enhanced to print TAP13 to cover test shell scripts that won't be
   able to use kselftest API.

 - Several fixes to existing tests to not fail in unsupported cases.
   This has been an ongoing work based on the feedback from stable
   release kselftest users.

 - A new watchdog test and much needed cleanups to the existing tests
   from Eugeniu Rosca.

 - Changes to kselftest common lib.mk framework to make RUN_TESTS a
   function to be called from individual test make files to run stress
   and destructive sub-tests.

* tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (41 commits)
  selftests: Enhance kselftest_harness.h to print which assert failed
  selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format
  selftests: change lib.mk RUN_TESTS to take test list as an argument
  selftests: lib.mk: suppress "cd" output from run_tests target
  selftests: kselftest framework: change skip exit code to 0
  selftests/timers: make loop consistent with array size
  selftests: timers: remove rtctest_setdate from run_destructive_tests
  selftests: timers: Fix run_destructive_tests target to handle skipped tests
  kselftests: timers: leap-a-day: Change default arguments to help test runs
  selftests: timers: drop support for !KTEST case
  rtc: rtctest: Improve support detection
  selftests/cpu-hotplug: Skip test when there is only one online cpu
  selftests/cpu-hotplug: exit with failure when test occured unexpected behaviors
  selftests: futex: convert test to use ksft TAP13 framework
  selftests: capabilities: convert error output to TAP13 ksft framework
  selftests: memfd: Align STACK_SIZE for ARM AArch64 system
  selftests: warn if failure is due to lack of executable bit
  selftests: kselftest framework: add error counter
  selftests: capabilities: convert the test to use TAP13 ksft framework
  selftests: capabilities: fix to run Non-root +ia, sgidroot =&gt; i test
  ...
</content>
</entry>
<entry>
<title>selftests: timers: drop support for !KTEST case</title>
<updated>2017-08-22T17:15:59Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-08-11T16:11:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b841065043f996e2bf7648786485f3935625592b'/>
<id>urn:sha1:b841065043f996e2bf7648786485f3935625592b</id>
<content type='text'>
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/952
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>kselftests: timers: set-timer-lat: Add one-shot timer test cases</title>
<updated>2017-08-17T19:14:58Z</updated>
<author>
<name>Greg Hackmann</name>
<email>ghackmann@google.com</email>
</author>
<published>2017-07-25T21:36:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=28be3f8f48cfb3cf024860f042d424cd4824f5f7'/>
<id>urn:sha1:28be3f8f48cfb3cf024860f042d424cd4824f5f7</id>
<content type='text'>
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 &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>kselftests: timers: set-timer-lat: Tweak reporting when timer fires early</title>
<updated>2017-08-17T19:14:54Z</updated>
<author>
<name>Greg Hackmann</name>
<email>ghackmann@google.com</email>
</author>
<published>2017-07-25T21:36:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a524b1184b8e86141d689fa78ad150fbf2db9b4c'/>
<id>urn:sha1:a524b1184b8e86141d689fa78ad150fbf2db9b4c</id>
<content type='text'>
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 &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>kselftests: timers: Make set-timer-lat fail more gracefully for !CAP_WAKE_ALARM</title>
<updated>2015-04-02T16:32:33Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2015-04-02T03:43:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=48fd77d1444a387435c3bbc773fa4e7ab6b6aca3'/>
<id>urn:sha1:48fd77d1444a387435c3bbc773fa4e7ab6b6aca3</id>
<content type='text'>
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 &lt;shuahkh@osg.samsung.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>kselftests: timers: Reduce default runtime on inconsistency-check and set-timer-lat</title>
<updated>2015-03-31T19:44:32Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2015-03-25T23:44:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e48f284d63ece564f8aa19fbf5434b3458af8d3f'/>
<id>urn:sha1:e48f284d63ece564f8aa19fbf5434b3458af8d3f</id>
<content type='text'>
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 &lt;shuahkh@osg.samsung.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests/timers: Add set-timer-lat test from timetest suite</title>
<updated>2015-03-12T19:22:14Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2015-03-12T00:40:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e40d0a22e728102bfea9543d827ee72206eecbb'/>
<id>urn:sha1:4e40d0a22e728102bfea9543d827ee72206eecbb</id>
<content type='text'>
Add my set-timer-lat test from the timetest suite. This
test checks the latency from set_timer and reports if
any are unreasonable (&gt;40ms).

Cc: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Tested-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
</feed>
