summaryrefslogtreecommitdiffstats
path: root/kernel/tools/testing/selftests/ftrace/test.d/00basic
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/testing/selftests/ftrace/test.d/00basic')
-rw-r--r--kernel/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc3
-rw-r--r--kernel/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc7
-rw-r--r--kernel/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc8
-rw-r--r--kernel/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc5
4 files changed, 23 insertions, 0 deletions
diff --git a/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
new file mode 100644
index 000000000..9980ff14a
--- /dev/null
+++ b/kernel/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/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
new file mode 100644
index 000000000..bf9a7b037
--- /dev/null
+++ b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
@@ -0,0 +1,7 @@
+#!/bin/sh
+# description: Basic test for tracers
+test -f available_tracers
+for t in `cat available_tracers`; do
+ echo $t > current_tracer
+done
+echo nop > current_tracer
diff --git a/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
new file mode 100644
index 000000000..bde6625d9
--- /dev/null
+++ b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
@@ -0,0 +1,8 @@
+#!/bin/sh
+# description: Basic trace clock test
+test -f trace_clock
+for c in `cat trace_clock | tr -d \[\]`; do
+ echo $c > trace_clock
+ grep '\['$c'\]' trace_clock
+done
+echo local > trace_clock
diff --git a/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc
new file mode 100644
index 000000000..aa51f6c17
--- /dev/null
+++ b/kernel/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc
@@ -0,0 +1,5 @@
+#!/bin/sh
+# description: Basic event tracing check
+test -f available_events -a -f set_event -a -d events
+# check scheduler events are available
+grep -q sched available_events && exit 0 || exit $FAIL