Skip to content

Commit

Permalink
ftracetest: Add ftrace basic testcases
Browse files Browse the repository at this point in the history
Add ftrace basic testcases. This just checks ftrace debugfs
interface works as it is designed.

Link: http://lkml.kernel.org/p/20140922234252.23415.62897.stgit@kbuild-f20.novalocal

Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Masami Hiramatsu authored and Steven Rostedt committed Sep 23, 2014
1 parent 6e68e6c commit 03e1664
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# description: Basic trace file check
test -f README -a -f trace -a -f tracing_on -a -f trace_pipe
6 changes: 6 additions & 0 deletions tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
# description: Basic test for tracers
for t in `cat available_tracers`; do
echo $t > current_tracer || exit 1
done
echo nop > current_tracer
8 changes: 8 additions & 0 deletions tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
# description: Basic trace clock test
[ -f trace_clock ] || exit 1
for c in `cat trace_clock | tr -d \[\]`; do
echo $c > trace_clock || exit 1
grep '\['$c'\]' trace_clock || exit 1
done
echo local > trace_clock

0 comments on commit 03e1664

Please sign in to comment.