<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/timers/set-timer-lat.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-11-27T22:24:31Z</updated>
<entry>
<title>selftests: complete kselftest include centralization</title>
<updated>2025-11-27T22:24:31Z</updated>
<author>
<name>Bala-Vignesh-Reddy</name>
<email>reddybalavignesh9979@gmail.com</email>
</author>
<published>2025-10-16T10:44:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e6fbd1759c9ece5044d3470f30a5e2166dc9de89'/>
<id>urn:sha1:e6fbd1759c9ece5044d3470f30a5e2166dc9de89</id>
<content type='text'>
This follow-up patch completes centralization of kselftest.h and
ksefltest_harness.h includes in remaining seltests files, replacing all
relative paths with a non-relative paths using shared -I include path in
lib.mk

Tested with gcc-13.3 and clang-18.1, and cross-compiled successfully on
riscv, arm64, x86_64 and powerpc arch.

[reddybalavignesh9979@gmail.com: add selftests include path for kselftest.h]
  Link: https://lkml.kernel.org/r/20251017090201.317521-1-reddybalavignesh9979@gmail.com
Link: https://lkml.kernel.org/r/20251016104409.68985-1-reddybalavignesh9979@gmail.com
Signed-off-by: Bala-Vignesh-Reddy &lt;reddybalavignesh9979@gmail.com&gt;
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df01930d0@linux-foundation.org/
Reviewed-by: Wei Yang &lt;richard.weiyang@gmail.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Günther Noack &lt;gnoack@google.com&gt;
Cc: Jakub Kacinski &lt;kuba@kernel.org&gt;
Cc: Liam Howlett &lt;liam.howlett@oracle.com&gt;
Cc: Lorenzo Stoakes &lt;lorenzo.stoakes@oracle.com&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Mickael Salaun &lt;mic@digikod.net&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests:timers: remove local CLOCKID defines</title>
<updated>2024-10-14T22:15:13Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2024-10-11T22:52:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ecfe6870abac400036d802e28dde4822ec153ffd'/>
<id>urn:sha1:ecfe6870abac400036d802e28dde4822ec153ffd</id>
<content type='text'>
timers tests defines CLOCKIDs locally. Remove all local CLOCKIDs except
CLOCK_HWSPECIFIC and use defines from time.h header file.

CLOCK_HWSPECIFIC and CLOCK_SGI_CYCLE are the same and CLOCK_SGI_CYCLE
is deprecated,

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Acked-by: John Stultz &lt;jstultz@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: timers: Remove unneeded semicolon</title>
<updated>2024-10-14T22:15:13Z</updated>
<author>
<name>Chen Ni</name>
<email>nichen@iscas.ac.cn</email>
</author>
<published>2024-10-10T07:37:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=488be88a3237f840fd5992465945ed6914b46257'/>
<id>urn:sha1:488be88a3237f840fd5992465945ed6914b46257</id>
<content type='text'>
Remove unnecessary semicolons reported by Coccinelle/coccicheck and the
semantic patch at scripts/coccinelle/misc/semicolon.cocci.

Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Acked-by: John Stultz &lt;jstultz@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines</title>
<updated>2024-10-14T22:15:12Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2024-09-24T00:30:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=80fa614e2fbcf11069f0995e1601fb2e5702e2f4'/>
<id>urn:sha1:80fa614e2fbcf11069f0995e1601fb2e5702e2f4</id>
<content type='text'>
Remove local NSEC_PER_SEC and USEC_PER_SEC defines. Pick them up from
include/vdso/time64.h. This requires -I $(top_srcdir) to the timers
Makefile to include the include/vdso/time64.h.

posix_timers test names the defines NSECS_PER_SEC and USECS_PER_SEC.
Change posix_timers test references to the defines to match the
defines in the header file.

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Acked-by: John Stultz &lt;jstultz@google.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: timers: ksft_exit functions do not return</title>
<updated>2024-05-06T19:57:21Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2024-04-24T17:24:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bc7e5d23be8925c3049f0232f83e2118e1cf373b'/>
<id>urn:sha1:bc7e5d23be8925c3049f0232f83e2118e1cf373b</id>
<content type='text'>
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that
unconditionally call exit() as __noreturn"), ksft_exit_...() functions
are marked as __noreturn, which means the return type should not be
'int' but 'void' because they are not returning anything (and never were
since exit() has always been called).

To facilitate updating the return type of these functions, remove
'return' before the calls to ksft_exit_...(), as __noreturn prevents the
compiler from warning that a caller of the ksft_exit functions does not
return a value because the program will terminate upon calling these
functions.

Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<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>
</feed>
