lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v15 15/15] tracing: Add hist trigger action 'expected fail' test case
Hi Tom,

On Wed, 13 Feb 2019 17:42:55 -0600
Tom Zanussi <zanussi@kernel.org> wrote:

> From: Tom Zanussi <tom.zanussi@linux.intel.com>
>
> Add a test case verifying that basic action combinations fail as
> expected.
>
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>

This looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you!

> ---
> .../inter-event/trigger-action-hist-xfail.tc | 30 ++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc
>
> 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
> --
> 2.14.1
>


--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2019-02-15 16:09    [W:0.137 / U:10.272 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site