linux-uconsole/tools/testing/selftests/ftrace/test.d/trigger
Masami Hiramatsu 2dc12479fb selftests/ftrace: Fix synthetic event test to delete event correctly
commit 0d0352d8b3 upstream.

Fix the synthetic event test case to remove event correctly.
If redirecting command to synthetic_event file without append
mode, it cleans up all existing events and execute (parse) the
command. This means "delete event" always fails to find the
target event.

Since previous synthetic event has a bug which doesn't return
-ENOENT even if it fails to find the deleting event, this test
passed. But fixing that bug, this test fails because this test
itself has a bug.

This fixes that bug by trying to delete event right after
adding an event, and use append mode redirection ('>>') instead
of normal redirection ('>').

Link: http://lkml.kernel.org/r/154013452832.25576.2305459545429386517.stgit@devbox

Acked-by: Shuah Khan <shuah@kernel.org>
Acked-by: Tom Zanussi <zanussi@linux.intel.com>
Tested-by: Tom Zanussi <zanussi@linux.intel.com>
Cc: Tom Zanussi <zanussi@kernel.org>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Rajvi Jingar <rajvi.jingar@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: stable@vger.kernel.org
Fixes: f06eec4d0f ('selftests: ftrace: Add inter-event hist triggers testcases')
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:08:55 -08:00
..
inter-event selftests/ftrace: Fix synthetic event test to delete event correctly 2018-11-13 11:08:55 -08:00
trigger-eventonoff.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-filter.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-hist-mod.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-hist.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-multihist.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-snapshot.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-stacktrace.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00
trigger-trace-marker-hist.tc tracing/selftest: Add selftests to test trace_marker histogram triggers 2018-05-29 08:29:54 -04:00
trigger-trace-marker-snapshot.tc tracing/selftest: Add test to test simple snapshot trigger for trace_marker 2018-06-04 17:28:01 -04:00
trigger-trace-marker-synthetic-kernel.tc tracing/selftest: Add test to test hist trigger between kernel event and trace_marker 2018-05-29 08:30:01 -04:00
trigger-trace-marker-synthetic.tc tracing/selftest: Add selftests to test trace_marker histogram triggers 2018-05-29 08:29:54 -04:00
trigger-traceonoff.tc selftests/ftrace: Introduce exit_pass and exit_fail 2017-11-15 08:07:53 -07:00