# Re: \[PATCH v13 08/12\] selftests: tracing: Add syntax testcase for wprobe

- From: sashiko-bot@kernel.org
- Date: 2026-08-22 09:35:03 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17448150
- Thread: https://ratatoskr.run/linux-perf-users/2026/08/17448127/t.md

```text
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The test comment `# BAD_ACCESS_ADDR` does not match the actual error logged by the kernel, which is `BAD_PROBE_ADDR`.
--

--- Patch [8]: [PATCH v13 08/12] selftests: tracing: Add syntax testcase for wprobe ---
commit fc72e33e91d484bd38ebdde9110dabef02740205
Author: Masami Hiramatsu (Google) [ref]

selftests: tracing: Add syntax testcase for wprobe

This commit adds a new testcase, wprobe_syntax_errors.tc, to verify the
syntax error handling of watch probe events.

> diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/wprobes_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/dynevent/wprobes_syntax_errors.tc
> new file mode 100644
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/dynevent/wprobes_syntax_errors.tc
[ ... ]
> +check_error '^w'			# NO_ARG_BODY
> +check_error 'w^10 w@jiffies'		# WPROBE_NO_MAXACT
> +check_error 'w ^symbol'			# BAD_ACCESS_FMT
> +check_error 'w ^a@symbol'		# BAD_ACCESS_TYPE
> +check_error 'w w@^symbol'		# BAD_ACCESS_ADDR
> +check_error 'w w@jiffies^+offset'	# BAD_ACCESS_ADDR

[Severity: Low]
This isn't a bug, but should this comment say BAD_PROBE_ADDR instead of
BAD_ACCESS_ADDR?

Looking at parse_address_spec() in kernel/trace/trace_wprobe.c, when the
offset fails to parse, it logs BAD_PROBE_ADDR rather than BAD_ACCESS_ADDR:

    if (kstrtoint(off_str, 0, &offset) != 0) {
        trace_probe_log_err(off_str - _spec, BAD_PROBE_ADDR);
        return -EINVAL;
    }

Could the comment in the test script be updated to match the actual error
constant logged by the kernel?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/178739053919.1520941.17662338993878200834.stgit@devnote2?part=8
```
