summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2019-02-13 17:42:55 -0600
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-02-20 13:51:08 -0500
commita3d86a4ad7e4cef6f04f722028916680b4f635cb (patch)
tree16eed4c3454596ba467f0aaac95c56627ba6be07 /tools
parent9c749a1f6e0f1037077a2b1f4f04d817f0b33cf1 (diff)
downloadlinux-a3d86a4ad7e4cef6f04f722028916680b4f635cb.tar.gz
linux-a3d86a4ad7e4cef6f04f722028916680b4f635cb.tar.bz2
linux-a3d86a4ad7e4cef6f04f722028916680b4f635cb.zip
tracing: Add hist trigger action 'expected fail' test case
Add a test case verifying that basic action combinations fail as expected. Link: http://lkml.kernel.org/r/1790bf93e01dbdfa1b4af945f42147d92bd565aa.1550100284.git.tom.zanussi@linux.intel.com Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc
new file mode 100644
index 000000000000..1221240f8cf6
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc
@@ -0,0 +1,30 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# description: event trigger - test inter-event histogram trigger expected fail actions
+
+fail() { #msg
+ echo $1
+ exit_fail
+}
+
+if [ ! -f set_event ]; then
+ echo "event tracing is not supported"
+ exit_unsupported
+fi
+
+if [ ! -f snapshot ]; then
+ echo "snapshot is not supported"
+ exit_unsupported
+fi
+
+grep -q "snapshot()" README || exit_unsupported # version issue
+
+echo "Test expected snapshot action failure"
+
+echo 'hist:keys=comm:onmatch(sched.sched_wakeup).snapshot()' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail
+
+echo "Test expected save action failure"
+
+echo 'hist:keys=comm:onmatch(sched.sched_wakeup).save(comm,prio)' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail
+
+exit_xfail