From: Tomas Glozar <tglozar@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>, Tomas Glozar <tglozar@redhat.com>
Cc: John Kacur <jkacur@redhat.com>,
Luis Goncalves <lgoncalv@redhat.com>,
Crystal Wood <crwood@redhat.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Wander Lairson Costa <wander@redhat.com>,
linux-trace-kernel <linux-trace-kernel@vger.kernel.org>
Subject: [RFC PATCH 02/10] rtla/tests: Add unit tests for aa action
Date: Fri, 27 Nov 2026 16:31:58 +0100 [thread overview]
Message-ID: <20261127153206.134322-3-tglozar@redhat.com> (raw)
In-Reply-To: <20261127153206.134322-1-tglozar@redhat.com>
Add unit tests for the new auto-analysis action (aa), mirroring the
existing tests for continue.
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
tools/tracing/rtla/tests/unit/actions.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tools/tracing/rtla/tests/unit/actions.c b/tools/tracing/rtla/tests/unit/actions.c
index 6d91ad698a925..6ab9638c2d256 100644
--- a/tools/tracing/rtla/tests/unit/actions.c
+++ b/tools/tracing/rtla/tests/unit/actions.c
@@ -291,6 +291,25 @@ START_TEST(test_actions_parse_continue_arg_bad)
}
END_TEST
+START_TEST(test_actions_parse_aa)
+{
+ ck_assert_int_eq(actions_parse(&actions_fixture, "aa", NULL), 0);
+
+ ck_assert_int_eq(actions_fixture.len, 1);
+ ck_assert_int_eq(actions_fixture.list[0].type, ACTION_AA);
+ ck_assert(actions_fixture.present[ACTION_AA]);
+}
+END_TEST
+
+START_TEST(test_actions_parse_aa_arg_bad)
+{
+ ck_assert_int_eq(actions_parse(&actions_fixture, "aa,foo=bar", NULL), -1);
+
+ ck_assert_int_eq(actions_fixture.len, 0);
+ ck_assert(!actions_fixture.present[ACTION_AA]);
+}
+END_TEST
+
START_TEST(test_actions_parse_invalid)
{
ck_assert_int_eq(actions_parse(&actions_fixture, "foobar", NULL), -1);
@@ -378,6 +397,8 @@ Suite *actions_suite(void)
tcase_add_test(tc, test_actions_parse_shell_arg_bad);
tcase_add_test(tc, test_actions_parse_continue);
tcase_add_test(tc, test_actions_parse_continue_arg_bad);
+ tcase_add_test(tc, test_actions_parse_aa);
+ tcase_add_test(tc, test_actions_parse_aa_arg_bad);
tcase_add_test(tc, test_actions_parse_invalid);
suite_add_tcase(s, tc);
--
2.56.1
next prev parent reply other threads:[~2026-11-27 15:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:31 [RFC PATCH 00/10] rtla/timerlat: Add auto-analysis action and report spike timestamps Tomas Glozar
2026-11-27 15:31 ` [RFC PATCH 01/10] rtla: Support auto-analysis as an action Tomas Glozar
2026-11-27 15:31 ` Tomas Glozar [this message]
2026-11-27 15:31 ` [RFC PATCH 03/10] rtla/tests: Add runtime tests for aa action Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 04/10] Documentation/rtla: Document " Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 05/10] rtla/trace: Add helper to read "now ts" stats field Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 06/10] rtla/trace: Add helper to gather "now ts" over a CPU set Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 07/10] rtla/trace: Allow storing start clock value of tracefs instances Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 08/10] rtla/timerlat: Save the trace clock at measurement start Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 09/10] rtla/timerlat_aa: Print time offset and seqnum of the spike Tomas Glozar
2026-11-27 15:32 ` [RFC PATCH 10/10] Documentation/rtla: Document auto-analysis timestamps Tomas Glozar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127153206.134322-3-tglozar@redhat.com \
--to=tglozar@redhat.com \
--cc=costa.shul@redhat.com \
--cc=crwood@redhat.com \
--cc=jkacur@redhat.com \
--cc=lgoncalv@redhat.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=wander@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox