mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
rtla/tests: Cover all hist options in runtime tests
Cover all options regarding histogram formatting for both rtla-osnoise-hist and rtla-timerlat-hist tools. All options also have output checking using positive or negative match, except for -b/--bucket-size and -E/--entries, which cannot be tested in isolated due to the output depending on the actual data collected. Old -E/--entries test for rtla-osnoise was replaced with a new one equivalent to the timerlat one. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260423130558.882022-7-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
This commit is contained in:
parent
f78ba48f11
commit
287ff55afe
|
|
@ -16,11 +16,25 @@ check_top_q_hist "verify the --stop/-s param" \
|
|||
"osnoise TOOL -s 30 -T 1" 2 "osnoise hit stop tracing"
|
||||
check_top_q_hist "verify the --trace param" \
|
||||
"osnoise TOOL -s 30 -T 1 -t" 2 "Saving trace to osnoise_trace.txt"
|
||||
check "verify the --entries/-E param" \
|
||||
"osnoise hist -P F:1 -c 0 -r 900000 -d 10s -b 10 -E 25"
|
||||
check_top_q_hist "verify the -c/--cpus param" \
|
||||
"osnoise TOOL -P F:1 -c 0 -r 900000 -d 10s -S 1 --on-threshold shell,command=tests/scripts/check-cpus.sh" 2 "^Affinity of threads: 0$"
|
||||
|
||||
# Histogram tests
|
||||
check "hist with -b/--bucket-size" \
|
||||
"osnoise hist -b 1 -d 1s"
|
||||
check "hist with -E/--entries" \
|
||||
"osnoise hist -E 10 -d 1s"
|
||||
check "hist with -E/--entries out of range" \
|
||||
"osnoise hist -E 1 -d 1s" 1 "^Entries must be > 10 and < 9999999$"
|
||||
check "hist with --no-header" \
|
||||
"osnoise hist --no-header -d 1s" 0 "" "RTLA osnoise histogram"
|
||||
check "hist with --with-zeros" \
|
||||
"osnoise hist --with-zeros -b 100000 -E 21 -d 1s" 0 '^2000000\s+0\s+'
|
||||
check "hist with --no-index" \
|
||||
"osnoise hist --no-index --with-zeros -d 1s" 0 "" "^count:"
|
||||
check "hist with --no-summary" \
|
||||
"osnoise hist --no-summary -d 1s" 0 "" "^count:"
|
||||
|
||||
# Test setting default period by putting an absurdly high period
|
||||
# and stopping on threshold.
|
||||
# If default period is not set, this will time out.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,26 @@ check_top_hist "disable auto-analysis" \
|
|||
check_top_q_hist "verify -c/--cpus" \
|
||||
"timerlat TOOL -c 0 -d 10s -T 1 --on-threshold shell,command=tests/scripts/check-cpus.sh" 2 "^Affinity of threads: 0$"
|
||||
|
||||
# Histogram tests
|
||||
check "hist with -b/--bucket-size" \
|
||||
"timerlat hist -b 1 -d 1s"
|
||||
check "hist with -E/--entries" \
|
||||
"timerlat hist -E 10 -d 1s"
|
||||
check "hist with -E/--entries out of range" \
|
||||
"timerlat hist -E 1 -d 1s" 1 "^Entries must be > 10 and < 9999999$"
|
||||
check "hist with --no-header" \
|
||||
"timerlat hist --no-header -d 1s" 0 "" "RTLA timerlat histogram"
|
||||
check "hist with --with-zeros" \
|
||||
"timerlat hist --with-zeros -b 100000 -E 21 -d 1s" 0 '^2000000\s+0\s+'
|
||||
check "hist with --no-index" \
|
||||
"timerlat hist --no-index --with-zeros -d 1s" 0 "" "^count:"
|
||||
check "hist with --no-summary" \
|
||||
"timerlat hist --no-summary -d 1s" 0 "" "^ALL:"
|
||||
check "hist with --no-irq" \
|
||||
"timerlat hist --no-irq -d 1s" 0 "" "IRQ-"
|
||||
check "hist with --no-thread" \
|
||||
"timerlat hist --no-thread -d 1s" 0 "" "Thr-"
|
||||
|
||||
# Actions tests
|
||||
check_top_q_hist "trace output through -t" \
|
||||
"timerlat TOOL -T 2 -t" 2 "^ Saving trace to timerlat_trace.txt$"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user