Linux Perf Users
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: sashiko-bot@kernel.org, linux-trace-kernel@vger.kernel.org,
	kvm@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v16 08/13] selftests: tracing: Add a basic testcase for wprobe
Date: Mon, 21 Sep 2026 18:21:34 +0900	[thread overview]
Message-ID: <20260921182134.e21fc14f88cd4c5946d80fab@kernel.org> (raw)
In-Reply-To: <20260914143011.81BA81F000FF@smtp.kernel.org>

On Mon, 14 Sep 2026 14:30:11 +0000
sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Unhandled error from `echo 1 > enable` causes false test failure under `set -e` when hardware watchpoints are unsupported.
> --
> 
> commit 70eb02867fbc0203498e0161a5c4b437b562d025
> Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> 
> selftests: tracing: Add a basic testcase for wprobe
> 
> Add 'add_remove_wprobe.tc' testcase for testing wprobe event that
> tests adding and removing operations of the wprobe event.
> 
> > diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_wprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_wprobe.tc
> > new file mode 100644
> > index 0000000000000..647c37d5e4c84
> > --- /dev/null
> > +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_wprobe.tc
> 
> [ ... ]
> 
> > +if [ ! -d events/wprobes/my_wprobe ]; then
> > +    echo "Failed to create wprobe event directory"
> > +    exit_fail
> > +fi
> > +
> > +echo 1 > events/wprobes/my_wprobe/enable
> 
> [Severity: Medium]
> Will this script falsely report a failure if hardware watchpoints are
> exhausted or unsupported on the platform?
> 
> Writing to the enable file triggers enable_trace_wprobe() and eventually
> register_wide_hw_breakpoint(), which allocates physical hardware debug
> registers. If this allocation fails (e.g., returning -ENOSPC or -EOPNOTSUPP),
> the echo command will return a non-zero exit status.
> 
> Because ftracetest runs test scripts with 'set -e' (errexit) active, this
> error will abort the script immediately and fail the test instead of safely
> skipping it.
> 
> Should this write be guarded with something like "|| exit_unsupported" to
> handle expected hardware limitations?

Hmm, this is not unsupported, but unresolved (environmental test
failure case).

Thanks,


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2026-09-21  9:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 12:49 [PATCH v16 00/13] tracing: wprobe: x86: Add wprobe for watchpoint Masami Hiramatsu (Google)
2026-09-14 12:49 ` [PATCH v16 01/13] x86/mce: Fix hardware debug register corruption on task migration Masami Hiramatsu (Google)
2026-09-14 13:04   ` sashiko-bot
2026-09-14 12:49 ` [PATCH v16 02/13] KVM: x86: Prevent host DR7 debug register leak into guest OS on NMI Masami Hiramatsu (Google)
2026-09-14 13:23   ` sashiko-bot
2026-09-14 14:35   ` Sean Christopherson
2026-09-16 23:45     ` Masami Hiramatsu
2026-09-14 12:50 ` [PATCH v16 03/13] x86/hw_breakpoints: Make DR7 updates NMI safe Masami Hiramatsu (Google)
2026-09-14 13:31   ` sashiko-bot
2026-09-14 12:50 ` [PATCH v16 04/13] x86/hw_breakpoints: Add arch_modify_local_hw_breakpoint_addr() API Masami Hiramatsu (Google)
2026-09-14 13:41   ` sashiko-bot
2026-09-14 12:50 ` [PATCH v16 05/13] HWBP: Add modify_local_hw_breakpoint_addr() API Masami Hiramatsu (Google)
2026-09-14 13:52   ` sashiko-bot
2026-09-14 12:50 ` [PATCH v16 06/13] tracing/wprobe: Add wprobe (watchpoint probe) trace event support Masami Hiramatsu (Google)
2026-09-14 14:14   ` sashiko-bot
2026-09-14 12:50 ` [PATCH v16 07/13] x86: hw_breakpoint: Add a kconfig to clarify when a breakpoint fires Masami Hiramatsu (Google)
2026-09-14 14:19   ` sashiko-bot
2026-09-14 12:51 ` [PATCH v16 08/13] selftests: tracing: Add a basic testcase for wprobe Masami Hiramatsu (Google)
2026-09-14 14:30   ` sashiko-bot
2026-09-21  9:21     ` Masami Hiramatsu [this message]
2026-09-14 12:51 ` [PATCH v16 09/13] selftests: tracing: Add syntax " Masami Hiramatsu (Google)
2026-09-14 14:35   ` sashiko-bot
2026-09-14 12:51 ` [PATCH v16 10/13] tracing/wprobe: Add set_wprobe and clear_wprobe event triggers Masami Hiramatsu (Google)
2026-09-14 14:58   ` sashiko-bot
2026-09-22  2:39     ` Masami Hiramatsu
2026-09-14 12:51 ` [PATCH v16 11/13] selftests: tracing: Add wprobe trigger testcase Masami Hiramatsu (Google)
2026-09-14 15:05   ` sashiko-bot
2026-09-14 12:51 ` [PATCH v16 12/13] tracing/wprobe: Support BTF typecast in fetchargs Masami Hiramatsu (Google)
2026-09-14 15:12   ` sashiko-bot
2026-09-14 12:52 ` [PATCH v16 13/13] tracing/wprobe: Support BTF struct offset resolution in set_wprobe trigger Masami Hiramatsu (Google)
2026-09-14 15:19   ` sashiko-bot

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=20260921182134.e21fc14f88cd4c5946d80fab@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-bot@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