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 03/10] rtla/tests: Add runtime tests for aa action
Date: Fri, 27 Nov 2026 16:31:59 +0100 [thread overview]
Message-ID: <20261127153206.134322-4-tglozar@redhat.com> (raw)
In-Reply-To: <20261127153206.134322-1-tglozar@redhat.com>
Cover auto-analysis action with runtime tests: the base case,
repeated auto-analysis with continue action, and combination of
auto-analysis action with --aa-only.
Verify that the aa action is correctly rejected for osnoise tools, as
osnoise does not currently support auto-analysis.
Also, separate the action test cases into blocks to make them more
readable, as they have grown into a quite long list.
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
tools/tracing/rtla/tests/osnoise.t | 4 ++++
tools/tracing/rtla/tests/timerlat.t | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/tools/tracing/rtla/tests/osnoise.t b/tools/tracing/rtla/tests/osnoise.t
index 352b302372453..d0173fe20caa5 100644
--- a/tools/tracing/rtla/tests/osnoise.t
+++ b/tools/tracing/rtla/tests/osnoise.t
@@ -100,5 +100,9 @@ check_top_hist "with trace output at end" \
"osnoise TOOL -d 1s --on-end trace" 0 "^ Saving trace to osnoise_trace.txt$"
check_top_q_hist "action with no threshold" \
"osnoise TOOL -d 1s --on-threshold shell,command='echo BAD'" 0 "" "BAD"
+check_top_hist "reject aa action on threshold" \
+ "osnoise TOOL --on-threshold aa" 1 "auto-analysis action is not supported with osnoise tools"
+check_top_hist "reject aa action on end" \
+ "osnoise TOOL --on-end aa" 1 "auto-analysis action is not supported with osnoise tools"
test_end
diff --git a/tools/tracing/rtla/tests/timerlat.t b/tools/tracing/rtla/tests/timerlat.t
index aab026ead6c55..2ebd1858be0bb 100644
--- a/tools/tracing/rtla/tests/timerlat.t
+++ b/tools/tracing/rtla/tests/timerlat.t
@@ -122,18 +122,31 @@ check_top_q_hist "trace output through --on-threshold trace" \
"timerlat TOOL -T 2 --on-threshold trace" 2 "^ Saving trace to timerlat_trace.txt$"
check_top_q_hist "trace output through --on-threshold trace with custom filename" \
"timerlat TOOL -T 2 --on-threshold trace,file=custom_filename.txt" 2 "^ Saving trace to custom_filename.txt$"
+
check_top_q_hist "exec command" \
"timerlat TOOL -T 2 --on-threshold shell,command='echo TestOutput'" 2 "^TestOutput$"
+
+check_top_hist "aa action" \
+ "timerlat TOOL -T 2 -d 3s --on-threshold aa" 2 "analyzing it"
+check_top_hist "aa action at end" \
+ "timerlat TOOL -T 2 -d 3s --on-end aa" 2 "analyzing it"
+check_top_hist "aa action with continue" \
+ "timerlat TOOL -T 2 -d 3s --on-threshold aa --on-threshold continue" 0 "analyzing it"
+check "aa action with --aa-only" \
+ "timerlat top -d 3s --aa-only 2 --on-threshold aa --on-threshold continue" 0 "analyzing it" "Timer Latency"
+
check_top_q_hist "multiple actions" \
"timerlat TOOL -T 2 --on-threshold shell,command='echo -n 1' --on-threshold shell,command='echo 2'" 2 "^12$"
check "hist stop at failed action" \
"timerlat hist -T 2 --on-threshold shell,command='echo -n 1; false' --on-threshold shell,command='echo -n 2'" 2 "^1# RTLA timerlat histogram$"
check "top stop at failed action" \
"timerlat top -T 2 --on-threshold shell,command='echo -n abc; false' --on-threshold shell,command='echo -n defgh'" 2 "^abc" "defgh"
+
check_top_q_hist "with continue" \
"timerlat TOOL -T 2 -d 5s --on-threshold shell,command='echo TestOutput' --on-threshold continue" 0 "^TestOutput$"
check_top_q_hist "with conditional continue" \
"timerlat TOOL -T 2 --on-threshold shell,command='if [ -f a ]; then echo 2; exit 1; else echo -n 1; touch a; fi' --on-threshold continue" 2 "^12$" "^2$"
+
check_top_hist "with trace output at end" \
"timerlat TOOL -d 1s --on-end trace" 0 "^ Saving trace to timerlat_trace.txt$"
check_top_q_hist "action with no threshold" \
--
2.56.1
next prev parent reply other threads:[~2026-11-27 15:33 UTC|newest]
Thread overview: 14+ 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 16:01 ` sashiko-bot
2026-11-27 15:31 ` [RFC PATCH 02/10] rtla/tests: Add unit tests for aa action Tomas Glozar
2026-11-27 15:31 ` Tomas Glozar [this message]
2026-11-27 16:16 ` [RFC PATCH 03/10] rtla/tests: Add runtime " sashiko-bot
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
2026-11-30 17:00 ` [RFC PATCH 00/10] rtla/timerlat: Add auto-analysis action and report spike timestamps John Kacur
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-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.