diff options
author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2023-02-21 02:49:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:29:37 +0300 |
commit | ea2808276d9b781763447a93e5ac6d0f44bffbbc (patch) | |
tree | 0ded6e755b1acf30ea76b41ac80196fef6f6e251 /tools | |
parent | 03379280558e6d57322d308ec71efb40e0975ab1 (diff) | |
download | linux-ea2808276d9b781763447a93e5ac6d0f44bffbbc.tar.xz |
selftests/ftrace: Fix eprobe syntax test case to check filter support
commit a457e944df92789ab31aaf35fae9db064e3c51c4 upstream.
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: 9e14bae7d049 ("selftests/ftrace: Add eprobe syntax error testcase")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc index fc1daac7f066..4f5e8c665156 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc @@ -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 -check_error 'e:foo/bar syscalls/sys_enter_openat if ^' # NO_EP_FILTER +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 |