<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/tracing/rtla/tests, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-03-09T07:49:16Z</updated>
<entry>
<title>tools/rtla: Consolidate nr_cpus usage across all tools</title>
<updated>2026-03-09T07:49:16Z</updated>
<author>
<name>Costa Shulyupin</name>
<email>costa.shul@redhat.com</email>
</author>
<published>2026-03-06T19:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=115b06a008756ec777249dc9f432dc1a6c681396'/>
<id>urn:sha1:115b06a008756ec777249dc9f432dc1a6c681396</id>
<content type='text'>
sysconf(_SC_NPROCESSORS_CONF) (via get_nprocs_conf) reflects
cpu_possible_mask, which is fixed at boot time, so querying it
repeatedly is unnecessary.

Replace multiple calls to sysconf(_SC_NPROCESSORS_CONF) with a single
global nr_cpus variable initialized once at startup.

`#pragma once` in timerlat_u.h is needed for pre-C23 compilers to avoid
redefinition errors.

Signed-off-by: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/r/20260306194953.2511960-2-costa.shul@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Add unit tests for utils.c</title>
<updated>2026-03-04T14:51:56Z</updated>
<author>
<name>Costa Shulyupin</name>
<email>costa.shul@redhat.com</email>
</author>
<published>2026-01-19T10:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a4080e5e426352a78f944db0ff29e029d89193b'/>
<id>urn:sha1:3a4080e5e426352a78f944db0ff29e029d89193b</id>
<content type='text'>
Add unit tests for utility functions in src/utils.c using the Check
testing framework. The tests verify parse_cpu_set(), strtoi(), and
parse_prio() functions.

Unit tests are built conditionally when libcheck is available.
Run tests with 'make unit-test'.

The test framework uses the Check library which provides process
isolation for each test, preventing failures in one test from
affecting others.

Signed-off-by: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/r/20260119105857.797498-3-costa.shul@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtla/tests: Run Test::Harness in verbose mode</title>
<updated>2026-01-07T14:57:16Z</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-11-26T14:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbb8ed6682f84e6e27c798a3117b0bcd4d0623c4'/>
<id>urn:sha1:fbb8ed6682f84e6e27c798a3117b0bcd4d0623c4</id>
<content type='text'>
Add -v flag to prove command to also print the names of tests that
succeeded, not only those that failed, to allow easier debugging of the
test suite.

Also, drop printing the option and value to stdout in
check_with_osnoise_options, which was a debugging print that was
accidentally left in the final commit, and which would be otherwise now
visible in make check output, as stdout is no longer suppressed.

Suggested-by: Crystal Wood &lt;crwood@redhat.com&gt;
Reviewed-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20251126144205.331954-6-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtla/tests: Test BPF action program</title>
<updated>2026-01-07T14:57:16Z</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-11-26T14:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5525aebd4e0c6f7d92ec1cb074218bbcf3d46f13'/>
<id>urn:sha1:5525aebd4e0c6f7d92ec1cb074218bbcf3d46f13</id>
<content type='text'>
Add a test that implements a BPF program writing to a test map, which
is attached to RTLA via --bpf-action to be executed on theshold
overflow.

A combination of --on-threshold shell with bpftool (which is always
present if BPF support is enabled) is used to check whether the BPF
program has executed successfully.

Suggested-by: Crystal Wood &lt;crwood@redhat.com&gt;
Link: https://lore.kernel.org/r/20251126144205.331954-5-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtla/tests: Don't rely on matching ^1ALL</title>
<updated>2025-11-21T09:30:27Z</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-11-12T15:25:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61f1fd5d69fde27cfc277d1f68a1e6e4f7265b4b'/>
<id>urn:sha1:61f1fd5d69fde27cfc277d1f68a1e6e4f7265b4b</id>
<content type='text'>
The timerlat "top stop at failed action" test was relying on "ALL" being
printed immediately after the "1" from the threshold action.  Besides being
fragile, this depends on stdbuf behavior, which is easy to miss when
recreating the test outside of the framework for debugging purposes.

Instead, use the expected/unexpected text mechanism from the
corresponding osnoise test.

Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Link: https://lore.kernel.org/r/20251112152529.956778-2-crwood@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtla/tests: Fix osnoise test calling timerlat</title>
<updated>2025-11-21T09:30:00Z</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-10-07T09:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34c170ae5c3036ef879567a37409a2859e327342'/>
<id>urn:sha1:34c170ae5c3036ef879567a37409a2859e327342</id>
<content type='text'>
osnoise test "top stop at failed action" is calling timerlat instead of
osnoise by mistake.

Fix it so that it calls the correct RTLA subcommand.

Fixes: 05b7e10687c6 ("tools/rtla: Add remaining support for osnoise actions")
Reviewed-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20251007095341.186923-3-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtla/tests: Extend action tests to 5s</title>
<updated>2025-11-21T09:29:01Z</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-10-07T09:53:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d649e9f04cb0224817dac8190461ef1674e32b37'/>
<id>urn:sha1:d649e9f04cb0224817dac8190461ef1674e32b37</id>
<content type='text'>
In non-BPF mode, it takes up to 1 second for RTLA to notice that tracing
has been stopped. That means that action tests cannot have a 1 second
duration, as the SIGALRM will be racing with the threshold overflow.

Previously, non-BPF mode actions were buggy and always executed
the action, even when stopping on duration or SIGINT, preventing
this issue from manifesting. Now that this has been fixed, the tests
have become flaky, and this has to be adjusted.

Fixes: 4e26f84abfbb ("rtla/tests: Add tests for actions")
Fixes: 05b7e10687c6 ("tools/rtla: Add remaining support for osnoise actions")
Reviewed-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20251007095341.186923-2-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Add remaining support for osnoise actions</title>
<updated>2025-09-27T08:53:48Z</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-09-07T02:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05b7e10687c69e0c28e62b9a74ce78b3e7463806'/>
<id>urn:sha1:05b7e10687c69e0c28e62b9a74ce78b3e7463806</id>
<content type='text'>
The basic functionality came with the consolidation; now hook up the
command line options, and add documentation and tests.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/20250907022325.243930-8-crwood@redhat.com
Reviewed-by: Tomas Glozar  &lt;tglozar@redhat.com&gt;
Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Add test engine support for unexpected output</title>
<updated>2025-09-27T08:53:21Z</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-09-07T02:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3cd6b18d1025f2fca991c5d9543396892df3a8dd'/>
<id>urn:sha1:3cd6b18d1025f2fca991c5d9543396892df3a8dd</id>
<content type='text'>
Add a check() parameter to indicate which text must not appear in the
output.

Simplify the code so that we can print failures as they happen rather
than trying to figure out what went wrong after printing "not ok".  This
also means that "not ok" gets printed after the info rather than before,
which seems more intuitive anyway.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/20250907022325.243930-7-crwood@redhat.com
Reviewed-by: Tomas Glozar  &lt;tglozar@redhat.com&gt;
Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Fix -A option name in test comment</title>
<updated>2025-09-27T08:53:07Z</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-09-07T02:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4e30c22baa745173997c831011a95e03771e466'/>
<id>urn:sha1:c4e30c22baa745173997c831011a95e03771e466</id>
<content type='text'>
This was changed to --on-threshold when the patches were applied.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/20250907022325.243930-6-crwood@redhat.com
Reviewed-by: Tomas Glozar  &lt;tglozar@redhat.com&gt;
Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
