diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-08-30 10:25:11 -0400 |
---|---|---|
committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-10-24 16:49:36 -0400 |
commit | c575dea2c1a50306d382615fad06767564734e0b (patch) | |
tree | 9e9fc04c4da9149ca71beafe8a3536c6dc7d9b1b | |
parent | c1edd060b41383bb6fa76008aacf4b0b3b1c46e7 (diff) |
selftests/ftrace: Add wakeup_rt tracer testcase
Add a testcase for wakeup_rt tracer. This requires chrt
command to test.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc b/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc new file mode 100644 index 000000000000..f99b5178e00a --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | # SPDX-License-Identifier: GPL2.0 | ||
3 | # description: Test wakeup RT tracer | ||
4 | |||
5 | if ! which chrt ; then | ||
6 | echo "chrt is not found. This test requires chrt command." | ||
7 | exit_unresolved | ||
8 | fi | ||
9 | |||
10 | if ! grep -wq "wakeup_rt" available_tracers ; then | ||
11 | echo "wakeup_rt tracer is not supported" | ||
12 | exit_unsupported | ||
13 | fi | ||
14 | |||
15 | echo wakeup_rt > current_tracer | ||
16 | echo 1 > tracing_on | ||
17 | echo 0 > tracing_max_latency | ||
18 | |||
19 | : "Wakeup a realtime task" | ||
20 | chrt -f 5 sleep 1 | ||
21 | |||
22 | echo 0 > tracing_on | ||
23 | grep "+ \[[[:digit:]]*\]" trace | ||
24 | grep "==> \[[[:digit:]]*\]" trace | ||
25 | |||