Skip to content

Commit a457e94

Browse files
committed
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: 9e14bae ("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>
1 parent 1339215 commit a457e94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ check_error 'e:foo/^bar.1 syscalls/sys_enter_openat' # BAD_EVENT_NAME
2222
check_error 'e:foo/bar syscalls/sys_enter_openat arg=^dfd' # BAD_FETCH_ARG
2323
check_error 'e:foo/bar syscalls/sys_enter_openat ^arg=$foo' # BAD_ATTACH_ARG
2424

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

2729
exit 0

0 commit comments

Comments
 (0)