Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tom Zanussi and committed by
Steven Rostedt (VMware)
a3d86a4a 9c749a1f

+30
+30
tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0 3 + # description: event trigger - test inter-event histogram trigger expected fail actions 4 + 5 + fail() { #msg 6 + echo $1 7 + exit_fail 8 + } 9 + 10 + if [ ! -f set_event ]; then 11 + echo "event tracing is not supported" 12 + exit_unsupported 13 + fi 14 + 15 + if [ ! -f snapshot ]; then 16 + echo "snapshot is not supported" 17 + exit_unsupported 18 + fi 19 + 20 + grep -q "snapshot()" README || exit_unsupported # version issue 21 + 22 + echo "Test expected snapshot action failure" 23 + 24 + echo 'hist:keys=comm:onmatch(sched.sched_wakeup).snapshot()' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail 25 + 26 + echo "Test expected save action failure" 27 + 28 + echo 'hist:keys=comm:onmatch(sched.sched_wakeup).save(comm,prio)' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail 29 + 30 + exit_xfail