Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v8 9/9] selftests: ftrace: Add wprobe trigger testcase
Date: Thu, 16 Jul 2026 03:12:20 +0000	[thread overview]
Message-ID: <20260716031221.569981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <178417043960.209165.373192587945789724.stgit@devnote2>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The selftest incorrectly assumes that unlinking a file (`rm`) will synchronously trigger `dentry_kill()`. This only works on filesystems that do not cache negative dentries (like `tmpfs`). On standard disk filesystems (like `ext4`), the test will fail.
--

--- Patch [9]: [PATCH v8 9/9] selftests: ftrace: Add wprobe trigger testcase ---
commit 02c2b6c1500ba6cce360f9d5447d679e62801d61
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>

selftests: ftrace: Add wprobe trigger testcase

This commit adds a testcase for checking wprobe triggers. It sets set_wprobe
and clear_wprobe triggers on fprobe events to watch dentry access.

> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc
> new file mode 100644
> index 0000000000000..5ffe43f886d1a
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc
[ ... ]
> +:;: "Start test workload" ;:
> +echo 1 >> tracing_on
> +
> +echo aaa > $TMPDIR/hoge
> +echo bbb > $TMPDIR/hoge
> +echo ccc > $TMPDIR/hoge
> +rm $TMPDIR/hoge
> +
> +:;: "Check trace results" ;:
> +cat trace | grep watch
> +
> +:;: "Ensure wprobe becomes disabled again" ;:
> +cat events/wprobes/watch/enable | grep 0

[Severity: Medium]
Will this regression cause the test to fail when $TMPDIR is on a standard disk
filesystem?

This selftest appears to rely on rm synchronously triggering dentry_kill() to
fire the clear_wprobe trigger.

While this works on memory-backed filesystems like tmpfs that do not cache
negative dentries (their d_delete operation immediately leads to dentry_kill()),
standard disk filesystems like ext4, xfs, or btrfs cache negative dentries to
optimize subsequent lookups. 

On those filesystems, unlinking the file leaves the dentry hashed on the dcache
LRU list, deferring dentry_kill() until memory pressure or a manual eviction
occurs. This would cause the test to fail when checking if the wprobe is
disabled.

Does this need to trigger a manual cache eviction or ensure the test runs on a
tmpfs mount to avoid failing?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/178417033089.209165.16717079876036408877.stgit@devnote2?part=9

      reply	other threads:[~2026-07-16  3:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  2:52 [PATCH v8 0/9] tracing: wprobe: x86: Add wprobe for watchpoint Masami Hiramatsu (Google)
2026-07-16  2:52 ` [PATCH v8 1/9] tracing: wprobe: Add watchpoint probe event based on hardware breakpoint Masami Hiramatsu (Google)
2026-07-16  3:13   ` sashiko-bot
2026-07-16  2:52 ` [PATCH v8 2/9] x86: hw_breakpoint: Add a kconfig to clarify when a breakpoint fires Masami Hiramatsu (Google)
2026-07-16  2:52 ` [PATCH v8 3/9] selftests: tracing: Add a basic testcase for wprobe Masami Hiramatsu (Google)
2026-07-16  3:05   ` sashiko-bot
2026-07-16  2:52 ` [PATCH v8 4/9] selftests: tracing: Add syntax " Masami Hiramatsu (Google)
2026-07-16  2:53 ` [PATCH v8 5/9] x86/hw_breakpoint: Unify breakpoint install/uninstall Masami Hiramatsu (Google)
2026-07-16  2:53 ` [PATCH v8 6/9] x86/hw_breakpoint: Add arch_reinstall_hw_breakpoint Masami Hiramatsu (Google)
2026-07-16  3:08   ` sashiko-bot
2026-07-16  2:53 ` [PATCH v8 7/9] HWBP: Add modify_wide_hw_breakpoint_local() API Masami Hiramatsu (Google)
2026-07-16  3:08   ` sashiko-bot
2026-07-16  2:53 ` [PATCH v8 8/9] tracing: wprobe: Add wprobe event trigger Masami Hiramatsu (Google)
2026-07-16  3:12   ` sashiko-bot
2026-07-16  2:53 ` [PATCH v8 9/9] selftests: ftrace: Add wprobe trigger testcase Masami Hiramatsu (Google)
2026-07-16  3:12   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260716031221.569981F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox