Commit a457e944 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google)
Browse files

selftests/ftrace: Fix eprobe syntax test case to check filter support

Fix eprobe syntax test case to check whether the kernel supports the filter
on eprobe for filter syntax test command. Without this fix, this test case
will fail if the kernel supports eprobe but doesn't support the filter on
eprobe.

Link: https://lore.kernel.org/all/167309834742.640500.379128668288448035.stgit@devnote3/



Fixes: 9e14bae7 ("selftests/ftrace: Add eprobe syntax error testcase")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 13392153
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ check_error 'e:foo/^bar.1 syscalls/sys_enter_openat' # BAD_EVENT_NAME
check_error 'e:foo/bar syscalls/sys_enter_openat arg=^dfd'	# BAD_FETCH_ARG
check_error 'e:foo/bar syscalls/sys_enter_openat ^arg=$foo'	# BAD_ATTACH_ARG

if grep -q '<attached-group>\.<attached-event>.*\[if <filter>\]' README; then
  check_error 'e:foo/bar syscalls/sys_enter_openat if ^'	# NO_EP_FILTER
fi

exit 0