aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-06-20 00:09:05 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-08-31 12:19:39 -0400
commit7f5291da4b15ad0ebc0965af41a1a2e3f04c3f08 (patch)
treed2c80a5cf28d7294ee5842f8b7196175944ae26a /tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
parentselftests/ftrace: Add syntax error test for immediates (diff)
downloadwireguard-linux-7f5291da4b15ad0ebc0965af41a1a2e3f04c3f08.tar.xz
wireguard-linux-7f5291da4b15ad0ebc0965af41a1a2e3f04c3f08.zip
selftests/ftrace: Add syntax error test for multiprobe
Add syntax error test cases for multiprobe appending errors. Link: http://lkml.kernel.org/r/156095694541.28024.11918630805148623119.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
index aa59944bcace..39ef7ac1f51c 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
@@ -87,4 +87,14 @@ case $(uname -m) in
;;
esac
+# multiprobe errors
+if grep -q "Create/append/" README && grep -q "imm-value" README; then
+echo 'p:kprobes/testevent _do_fork' > kprobe_events
+check_error '^r:kprobes/testevent do_exit' # DIFF_PROBE_TYPE
+echo 'p:kprobes/testevent _do_fork abcd=\1' > kprobe_events
+check_error 'p:kprobes/testevent _do_fork ^bcd=\1' # DIFF_ARG_TYPE
+check_error 'p:kprobes/testevent _do_fork ^abcd=\1:u8' # DIFF_ARG_TYPE
+check_error 'p:kprobes/testevent _do_fork ^abcd=\"foo"' # DIFF_ARG_TYPE
+fi
+
exit 0