Skip to content

Commit 892ae5f

Browse files
lenticularis39rostedt
authored andcommitted
rtla/tests: Add grep checks for base test cases
Checking for patterns in rtla output with grep was added to test rtla actions. Add grep checks also for base tests where applicable. Also fix trace event histogram trigger check to use the correct syntax for the command-line option so that the test passes with the grep check. Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Chang Yin <[email protected]> Cc: Costa Shulyupin <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 70165c7 commit 892ae5f

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

tools/tracing/rtla/tests/hwnoise.t

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ test_begin
66
set_timeout 2m
77

88
check "verify help page" \
9-
"hwnoise --help"
9+
"hwnoise --help" 0 "summary of hardware-related noise"
1010
check "detect noise higher than one microsecond" \
11-
"hwnoise -c 0 -T 1 -d 5s -q"
11+
"hwnoise -c 0 -T 1 -d 5s -q" 0
1212
check "set the automatic trace mode" \
13-
"hwnoise -a 5 -d 10s" 2
13+
"hwnoise -a 5 -d 10s" 2 "osnoise hit stop tracing"
1414
check "set scheduling param to the osnoise tracer threads" \
1515
"hwnoise -P F:1 -c 0 -r 900000 -d 10s -q"
1616
check "stop the trace if a single sample is higher than 1 us" \
17-
"hwnoise -s 1 -T 1 -t -d 10s" 2
17+
"hwnoise -s 1 -T 1 -t -d 10s" 2 "Saving trace to osnoise_trace.txt"
1818
check "enable a trace event trigger" \
19-
"hwnoise -t -e osnoise:irq_noise trigger=\"hist:key=desc,duration:sort=desc,duration:vals=hitcount\" -d 10s"
19+
"hwnoise -t -e osnoise:irq_noise --trigger=\"hist:key=desc,duration:sort=desc,duration:vals=hitcount\" -d 10s" \
20+
0 "Saving event osnoise:irq_noise hist to osnoise_irq_noise_hist.txt"
2021

2122
test_end

tools/tracing/rtla/tests/osnoise.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ test_begin
66
set_timeout 2m
77

88
check "verify help page" \
9-
"osnoise --help"
9+
"osnoise --help" 0 "osnoise version"
1010
check "verify the --priority/-P param" \
1111
"osnoise top -P F:1 -c 0 -r 900000 -d 10s -q"
1212
check "verify the --stop/-s param" \
13-
"osnoise top -s 30 -T 1 -t" 2
13+
"osnoise top -s 30 -T 1" 2 "osnoise hit stop tracing"
1414
check "verify the --trace param" \
15-
"osnoise hist -s 30 -T 1 -t" 2
15+
"osnoise hist -s 30 -T 1 -t" 2 "Saving trace to osnoise_trace.txt"
1616
check "verify the --entries/-E param" \
1717
"osnoise hist -P F:1 -c 0 -r 900000 -d 10s -b 10 -E 25"
1818

tools/tracing/rtla/tests/timerlat.t

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,25 @@ export RTLA_NO_BPF=$option
2121

2222
# Basic tests
2323
check "verify help page" \
24-
"timerlat --help"
24+
"timerlat --help" 0 "timerlat version"
2525
check "verify -s/--stack" \
26-
"timerlat top -s 3 -T 10 -t" 2
26+
"timerlat top -s 3 -T 10 -t" 2 "Blocking thread stack trace"
2727
check "verify -P/--priority" \
2828
"timerlat top -P F:1 -c 0 -d 10s -q"
2929
check "test in nanoseconds" \
30-
"timerlat top -i 2 -c 0 -n -d 10s" 2
30+
"timerlat top -i 2 -c 0 -n -d 10s" 2 "ns"
3131
check "set the automatic trace mode" \
32-
"timerlat top -a 5 --dump-tasks" 2
32+
"timerlat top -a 5" 2 "analyzing it"
33+
check "dump tasks" \
34+
"timerlat top -a 5 --dump-tasks" 2 "Printing CPU tasks"
3335
check "print the auto-analysis if hits the stop tracing condition" \
3436
"timerlat top --aa-only 5" 2
3537
check "disable auto-analysis" \
3638
"timerlat top -s 3 -T 10 -t --no-aa" 2
3739
check "verify -c/--cpus" \
3840
"timerlat hist -c 0 -d 10s"
3941
check "hist test in nanoseconds" \
40-
"timerlat hist -i 2 -c 0 -n -d 10s" 2
42+
"timerlat hist -i 2 -c 0 -n -d 10s" 2 "ns"
4143

4244
# Actions tests
4345
check "trace output through -t" \

0 commit comments

Comments
 (0)