diff mbox series

[v2,05/32] selftests/ftrace: More initialize features in initialize_ftrace

Message ID 153443709338.23257.2179609309041817332.stgit@devbox (mailing list archive)
State Superseded
Headers show
Series selftests/ftrace: Improve ftracetest with coverage check | expand

Commit Message

Masami Hiramatsu (Google) Aug. 16, 2018, 4:31 p.m. UTC
Clear pid filter, synthetic_events, snapshots,
ftrace filter, and trace log in initialize_ftrace(),
since those are used in test cases.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
  Changes in v2:
   - Add reset_ftrace_filter
---
 tools/testing/selftests/ftrace/test.d/functions |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Steven Rostedt Aug. 24, 2018, 9:24 p.m. UTC | #1
On Fri, 17 Aug 2018 01:31:33 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Clear pid filter, synthetic_events, snapshots,
> ftrace filter, and trace log in initialize_ftrace(),
> since those are used in test cases.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> ---
>   Changes in v2:
>    - Add reset_ftrace_filter
> ---
>  tools/testing/selftests/ftrace/test.d/functions |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> index e4645d5e3126..b2bfa4dd43f7 100644
> --- a/tools/testing/selftests/ftrace/test.d/functions
> +++ b/tools/testing/selftests/ftrace/test.d/functions
> @@ -89,12 +89,17 @@ initialize_ftrace() { # Reset ftrace to initial-state
>      reset_tracer
>      reset_trigger
>      reset_events_filter
> +    reset_ftrace_filter
>      disable_events
>      echo > set_event_pid	# event tracer is always on
> +    echo > set_ftrace_pid
>      [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
>      [ -f set_graph_function ] && echo | tee set_graph_*
>      [ -f stack_trace_filter ] && echo > stack_trace_filter
>      [ -f kprobe_events ] && echo > kprobe_events
>      [ -f uprobe_events ] && echo > uprobe_events
> +    [ -f synthetic_events ] && echo > synthetic_events
> +    [ -f snapshot ] && echo 0 > snapshot
> +    clear_trace
>      enable_tracing
>  }
Steven Rostedt Aug. 24, 2018, 9:46 p.m. UTC | #2
On Fri, 17 Aug 2018 01:31:33 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Clear pid filter, synthetic_events, snapshots,
> ftrace filter, and trace log in initialize_ftrace(),
> since those are used in test cases.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> ---
>   Changes in v2:
>    - Add reset_ftrace_filter
> ---
>  tools/testing/selftests/ftrace/test.d/functions |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> index e4645d5e3126..b2bfa4dd43f7 100644
> --- a/tools/testing/selftests/ftrace/test.d/functions
> +++ b/tools/testing/selftests/ftrace/test.d/functions
> @@ -89,12 +89,17 @@ initialize_ftrace() { # Reset ftrace to initial-state
>      reset_tracer
>      reset_trigger
>      reset_events_filter
> +    reset_ftrace_filter
>      disable_events
>      echo > set_event_pid	# event tracer is always on
> +    echo > set_ftrace_pid
>      [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
>      [ -f set_graph_function ] && echo | tee set_graph_*
>      [ -f stack_trace_filter ] && echo > stack_trace_filter
>      [ -f kprobe_events ] && echo > kprobe_events
>      [ -f uprobe_events ] && echo > uprobe_events
> +    [ -f synthetic_events ] && echo > synthetic_events
> +    [ -f snapshot ] && echo 0 > snapshot
> +    clear_trace
>      enable_tracing
>  }
Steven Rostedt Aug. 24, 2018, 9:46 p.m. UTC | #3
On Fri, 24 Aug 2018 17:46:01 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 17 Aug 2018 01:31:33 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > Clear pid filter, synthetic_events, snapshots,
> > ftrace filter, and trace log in initialize_ftrace(),
> > since those are used in test cases.
> > 
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>  
> 
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 

Bah, this was suppose to be for the previous patch (which I just got
done testing). I'll send out a separate ack for that.

-- Steve
diff mbox series

Patch

diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index e4645d5e3126..b2bfa4dd43f7 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -89,12 +89,17 @@  initialize_ftrace() { # Reset ftrace to initial-state
     reset_tracer
     reset_trigger
     reset_events_filter
+    reset_ftrace_filter
     disable_events
     echo > set_event_pid	# event tracer is always on
+    echo > set_ftrace_pid
     [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
     [ -f set_graph_function ] && echo | tee set_graph_*
     [ -f stack_trace_filter ] && echo > stack_trace_filter
     [ -f kprobe_events ] && echo > kprobe_events
     [ -f uprobe_events ] && echo > uprobe_events
+    [ -f synthetic_events ] && echo > synthetic_events
+    [ -f snapshot ] && echo 0 > snapshot
+    clear_trace
     enable_tracing
 }