[PATCH] selftests/ftrace: Fix BAD_TP_NAME marker in fprobe_syntax_errors

Cao Ruichuang
2026-04-07T12:12:36Z

The BAD_TP_NAME check currently expects the error marker for
`t kmem/kfree` to point at the slash. Current kernels report
this parse error at the start of the invalid tracepoint name,
so the selftest fails even though the input is still rejected.

Move the caret to match the reported error position.

Signed-off-by: Cao Ruichuang <create0818@163.com>
---
.../selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc
index fee479295..e51f642c3 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc
@@ -27,7 +27,7 @@ check_error 'f:^foo.1/bar vfs_read' # BAD_GROUP_NAME
check_error 'f:^ vfs_read' # NO_EVENT_NAME
check_error 'f:foo/^12345678901234567890123456789012345678901234567890123456789012345 vfs_read' # EVENT_TOO_LONG
check_error 'f:foo/^bar.1 vfs_read' # BAD_EVENT_NAME
-check_error 't kmem^/kfree' # BAD_TP_NAME
+check_error 't ^kmem/kfree' # BAD_TP_NAME

check_error 'f vfs_read ^$stack10000' # BAD_STACK_NUM

--
2.39.5 (Apple Git-154)