summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2014-09-23 03:42:52 +0400
committerSteven Rostedt <rostedt@goodmis.org>2014-09-23 17:32:00 +0400
commit03e166450fca3867a8e940d13d650f11aa03ee90 (patch)
tree2b9e81c9e54d47469cf7c1e0915ea4688ea1b296 /tools/testing
parent6e68e6c5e4b67a02aaa406da6124ea5cae7d5e10 (diff)
downloadlinux-03e166450fca3867a8e940d13d650f11aa03ee90.tar.xz
ftracetest: Add ftrace basic testcases
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>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/basic1.tc3
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/basic2.tc6
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/basic3.tc8
3 files changed, 17 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
new file mode 100644
index 000000000000..9980ff14ae44
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
@@ -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
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
new file mode 100644
index 000000000000..b04f30df0db3
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
@@ -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
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
new file mode 100644
index 000000000000..0c1a3a207636
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
@@ -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