From: sashiko-bot@kernel.org
To: "Andi Kleen" <ak@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [RFC v1 19/19] ptwrite uprobes: Add self tests
Date: Mon, 31 Aug 2026 21:47:06 +0000 [thread overview]
Message-ID: <20260831214707.383291F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260831150651.1134594-20-ak@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing test scripts and source files cause selftests build failures and unconditional skips.
--
commit cdbf7a2bf57258522e6b6951a74593c1f59e7dd4
Author: Andi Kleen <ak@kernel.org>
ptwrite uprobes: Add self tests
This commit adds selftests for ptwrite uprobes. It tests various cases using
both the main probes and the perf decoder.
> diff --git a/tools/testing/selftests/uprobes/Makefile b/tools/testing/selftests/uprobes/Makefile
> new file mode 100644
> index 0000000000000..9fc65c1f04c84
> --- /dev/null
> +++ b/tools/testing/selftests/uprobes/Makefile
> @@ -0,0 +1,15 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# ptwrite uprobe selftests (x86-64).
> +ARCH ?= $(shell uname -m 2>/dev/null || echo not)
> +CFLAGS += -O2 -Wall -no-pie
> +
> +TEST_GEN_FILES := ptw_probe
> +TEST_PROGS := run_ptw.sh run_module.sh run_perfprobe.sh run_decode.sh
[Severity: Medium]
Will this break the selftests build during a `make install`? The Makefile
lists run_module.sh and run_perfprobe.sh in TEST_PROGS, but these files do
not appear to be included in this patch.
[ ... ]
> diff --git a/tools/testing/selftests/uprobes/run_decode.sh b/tools/testing/selftests/uprobes/run_decode.sh
> new file mode 100755
> index 0000000000000..b427442041aa9
> --- /dev/null
> +++ b/tools/testing/selftests/uprobes/run_decode.sh
> @@ -0,0 +1,177 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# run_decode.sh - ptwrite decoder selftests.
> +# Exercises the decoder CLI and PT/perf integration.
> +# Root + tracefs + perf + gcc + a PTWRITE-capable CPU required.
> +set -u
> +DIR=$(dirname "$(readlink -f "$0")")
> +SRC=${1:-"$DIR/manual_ptw.c"}
[Severity: Medium]
Does this cause the test to unconditionally skip? The SRC variable defaults
to manual_ptw.c, but this source file seems to be missing from the commit.
If the file is added in a subsequent version, should it also be included in
TEST_FILES in the Makefile to ensure it is installed correctly during
`make install`?
[ ... ]
> +if ! gcc -O2 -no-pie -o "$BIN" "$SRC" 2>/dev/null; then
> + echo "1..0 # SKIP test program build failed"
> + exit 0
> +fi
> +
> +TV=$(objdump -d "$BIN" 2>/dev/null |
> + awk '/^[0-9a-f]+ <target>:/{print $1;exit}' | tr -d ':')
[Severity: Medium]
Is manual_ptw.c missing from the commit? This logic expects the compiled
test binary to contain a `target` function, which further suggests that the
omitted C file is strictly required for this test to function.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831150651.1134594-1-ak@kernel.org?part=19
prev parent reply other threads:[~2026-08-31 21:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 15:04 [RFC] ptwrite uprobes Andi Kleen
2026-08-31 15:04 ` [RFC v1 01/19] uprobes: guard trace cleanup against error pointers Andi Kleen
2026-08-31 18:15 ` sashiko-bot
2026-09-01 0:49 ` Masami Hiramatsu
2026-08-31 15:04 ` [RFC v1 02/19] uprobes: Correctly reject anonymous VMAs for breakpoint installation Andi Kleen
2026-08-31 18:29 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 03/19] uprobes: Print warning for missing breakpoint install Andi Kleen
2026-08-31 18:42 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 04/19] ptwrite uprobes: Add infrastructure for ptwrite uprobes Andi Kleen
2026-08-31 18:55 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 05/19] ptwrite uprobes: Add minimal low level support for x86 Andi Kleen
2026-08-31 19:11 ` sashiko-bot
2026-09-02 16:35 ` Lorenzo Stoakes (ARM)
2026-08-31 15:04 ` [RFC v1 06/19] ptwrite uprobes: Add a sample module to exercise interface Andi Kleen
2026-08-31 19:19 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 07/19] ptwrite uprobes: Add support to tracing infrastructure Andi Kleen
2026-08-31 19:31 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 08/19] ptwrite uprobes / x86: Add a user fault notifier chain Andi Kleen
2026-08-31 19:38 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 09/19] ptwrite uprobes: Factor file-backed instruction reads Andi Kleen
2026-08-31 19:45 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 10/19] ptwrite uprobes: Minimal memory references and fault handling Andi Kleen
2026-08-31 19:59 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 11/19] ptwrite uprobes: Add multinop support Andi Kleen
2026-08-31 20:09 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 12/19] ptwrite uprobes: Add pacing to the probes Andi Kleen
2026-08-31 20:19 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 13/19] ptwrite uprobes: Support instruction puning Andi Kleen
2026-08-31 20:39 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 14/19] ptwrite uprobes: Use atomic patching for multinop sites Andi Kleen
2026-08-31 21:08 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 15/19] ptwrite uprobes: Add a tutorial and overview documentation Andi Kleen
2026-08-31 21:10 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 16/19] ptwrite uprobes / perf tools pt: Improve FUP error handling for ptwrite Andi Kleen
2026-08-31 21:19 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 17/19] ptwrite uprobes / perf tools probe: Add support of ptwrite probes Andi Kleen
2026-08-31 21:32 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 18/19] ptwrite uprobes / perf tools script: Add ptwrite uprobes decoder Andi Kleen
2026-08-31 21:39 ` sashiko-bot
2026-08-31 15:04 ` [RFC v1 19/19] ptwrite uprobes: Add self tests Andi Kleen
2026-08-31 21:47 ` 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=20260831214707.383291F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ak@kernel.org \
--cc=linux-perf-users@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.