Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH] rtla/tests: Test actions in absence of threshold
@ 2026-08-07  9:45 Tomas Glozar
  0 siblings, 0 replies; only message in thread
From: Tomas Glozar @ 2026-08-07  9:45 UTC (permalink / raw)
  To: Steven Rostedt, Tomas Glozar
  Cc: John Kacur, Luis Goncalves, Crystal Wood, Costa Shulyupin,
	Wander Lairson Costa, LKML, linux-trace-kernel

Commit fafb66e5903c ("rtla/timerlat_top: Fix on-threshold actions firing
on signal") fixed a bug where on-threshold actions were being triggered
even without a threshold being set.

Test all four tools with an --on-threshold action, but with no set
threshold, and verify the action does not trigger.

Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
 tools/tracing/rtla/tests/osnoise.t  | 2 ++
 tools/tracing/rtla/tests/timerlat.t | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/tools/tracing/rtla/tests/osnoise.t b/tools/tracing/rtla/tests/osnoise.t
index 214fd40fc610c..352b302372453 100644
--- a/tools/tracing/rtla/tests/osnoise.t
+++ b/tools/tracing/rtla/tests/osnoise.t
@@ -98,5 +98,7 @@ check_top_q_hist "with conditional continue" \
 	"osnoise TOOL -S 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" \
 	"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"
 
 test_end
diff --git a/tools/tracing/rtla/tests/timerlat.t b/tools/tracing/rtla/tests/timerlat.t
index 5116857d7da45..1d317c851a0fa 100644
--- a/tools/tracing/rtla/tests/timerlat.t
+++ b/tools/tracing/rtla/tests/timerlat.t
@@ -136,6 +136,8 @@ 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" \
+	"timerlat TOOL -d 1s --on-threshold shell,command='echo BAD'" 0 "" "BAD"
 
 # BPF action program tests
 if [ "$option" -eq 0 ]
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  9:45 [PATCH] rtla/tests: Test actions in absence of threshold Tomas Glozar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox