selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions
authorTom Zanussi <tom.zanussi@linux.intel.com>
Sun, 31 Mar 2019 23:48:21 +0000 (18:48 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 8 Apr 2019 13:22:50 +0000 (09:22 -0400)
commitc5e4114fee0b6582b6e86804ffef95bf82bb5f78
treec841db96850d0054cf79097350946bde48f5eaa4
parent8ab4483eb660b37251847e1e2a1f787b8d568e81
selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions

The k/uprobe_sytax_errors test case defines a check_error() function
used to run a command and check the position of the caret in the
output.

This would be useful for other ftrace facilities too, so move it to
test.d/functions for use by anyone.  In the process, rename it to
ftrace_errlog_check() and parametrize it for general use.

Link: http://lkml.kernel.org/r/9f88080a06f1755811f69081926afe7e5cb53178.1554072478.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>
tools/testing/selftests/ftrace/test.d/functions
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors.tc