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 3/9] selftests: tracing: Add a basic testcase for wprobe
Date: Thu, 16 Jul 2026 03:05:54 +0000	[thread overview]
Message-ID: <20260716030554.D7E401F000E9@smtp.kernel.org> (raw)
In-Reply-To: <178417036552.209165.10709545532621528052.stgit@devnote2>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Error handling blocks checking `$?` are dead code because the test script runs under `set -e`.
--

--- Patch [3]: [PATCH v8 3/9] selftests: tracing: Add a basic testcase for wprobe ---
commit 0ee1282cbf519c56b378956b7875111e8d6bc222
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>

selftests: tracing: Add a basic testcase for wprobe

This commit adds a basic testcase 'add_remove_wprobe.tc' to verify the adding
and removing operations for wprobe events.

> 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..5ddf28ddd2c4b
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_wprobe.tc
> @@ -0,0 +1,69 @@
> +#!/bin/sh

[ ... ]

> +echo "w:my_wprobe w@$TARGET" >> dynamic_events
> +
> +grep -q my_wprobe dynamic_events
> +if [ $? -ne 0 ]; then

[Severity: Low]
Since ftracetest executes these scripts with errexit (set -e) enabled, will
the script exit immediately if the grep command fails?

If the script aborts on the failed command, this if block and the others like
it throughout the script become dead code, preventing the custom diagnostic
messages from being printed in the failure logs.

> +    echo "Failed to create wprobe event"
> +    exit_fail
> +fi
> +
> +test -d events/wprobes/my_wprobe
> +if [ $? -ne 0 ]; then

[Severity: Low]
Similarly here, does the test command cause an immediate exit before $? can be
evaluated?

> +    echo "Failed to create wprobe event directory"
> +    exit_fail
> +fi

[ ... ]

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

  reply	other threads:[~2026-07-16  3:05 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 [this message]
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

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=20260716030554.D7E401F000E9@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