From: sashiko-bot@kernel.org
To: "Breno Rodrigues Alves" <breno3011alves@gmail.com>,
linux-perf-users@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/2] perf/kselftest: convert prefix.pl to Python
Date: Sun, 18 Oct 2026 13:35:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-176156@kernel.org> (raw)
In-Reply-To: <20261018133032.24467-2-breno3011alves@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] selftests: accidental deletion of tap_timeout() header in runner.sh
--
commit 3307ba1d73611e0bd22bd59e12d190de9b29a3a2
Author: Breno Rodrigues Alves <breno3011alves@gmail.com>
perf/kselftest: convert prefix.pl to Python
This commit replaces tools/testing/selftests/kselftest/prefix.pl with a
Python 3 implementation (prefix.py) and updates runner.sh and the
selftests Makefile to use and install the new script.
> diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
> index 311811dc55a07..b61ea6c2de89d 100644
> --- a/tools/testing/selftests/kselftest/runner.sh
> +++ b/tools/testing/selftests/kselftest/runner.sh
> @@ -29,15 +29,12 @@ TR_CMD=$(command -v tr)
> # with sed instead of unbuffered output.
> tap_prefix()
> {
> - if [ ! -x /usr/bin/perl ]; then
> + if [ ! -x /usr/bin/python3 ]; then
> sed -e 's/^/# /'
> else
> - "$BASE_DIR"/kselftest/prefix.pl
> + "$BASE_DIR"/kselftest/prefix.py
> fi
> }
> -
> -tap_timeout()
> -{
> # Make sure tests will time out if utility is available.
> if [ -x /usr/bin/timeout ] ; then
> /usr/bin/timeout --foreground "$kselftest_timeout" \
[Severity: Medium]
Was the removal of the tap_timeout() function header and opening brace here
unintentional?
Without it, the body of tap_timeout() is left at top-level scope followed by
an unmatched closing brace:
tools/testing/selftests/kselftest/runner.sh:
# Make sure tests will time out if utility is available.
if [ -x /usr/bin/timeout ] ; then
/usr/bin/timeout --foreground "$kselftest_timeout" \
/usr/bin/timeout "$kselftest_timeout" $1
else
$1
fi
}
When tools/testing/selftests/kselftest/runner.sh is sourced (for example via
RUN_TESTS in tools/testing/selftests/lib.mk or
tools/testing/selftests/run_kselftest.sh), the shell executes the timeout
logic immediately and fails with a syntax error on the closing brace.
In addition, tap_timeout() is no longer defined when run_one() invokes it:
tools/testing/selftests/kselftest/runner.sh:run_one() {
...
(((( tap_timeout "$cmd" 2>&1; echo $? >&3) |
tap_prefix >&4) 3>&1) |
(read xs; exit $xs)) 4>>"$logfile"
...
}
—
AI reviewed your patch. Please follow the URL below to transplant the feedback or give kudos to the AI:
https://github.com/kernel-patches/vmtest/wiki
계가
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261018133032.24467-1-breno3011alves@gmail.com?part=1
next prev parent reply other threads:[~2026-10-18 13:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 12:56 [RFC PATCH 0/5] perf/tests: convert Perl test helpers to Python Breno Rodrigues Alves
2026-10-18 12:56 ` [RFC PATCH 1/5] perf/kselftest: convert prefix.pl " Breno Rodrigues Alves
2026-10-18 13:01 ` sashiko-bot
2026-10-18 12:56 ` [RFC PATCH 2/5] perf/tests: convert check_all_patterns_found.pl " Breno Rodrigues Alves
2026-10-18 13:02 ` sashiko-bot
2026-10-18 12:56 ` [RFC PATCH 3/5] perf/tests: convert check_no_patterns_found.pl " Breno Rodrigues Alves
2026-10-18 13:03 ` sashiko-bot
2026-10-18 12:56 ` [RFC PATCH 4/5] perf/tests: convert check_all_lines_matched.pl " Breno Rodrigues Alves
2026-10-18 13:07 ` sashiko-bot
2026-10-18 12:56 ` [RFC PATCH 5/5] perf/tests: convert check_errors_whitelisted.pl " Breno Rodrigues Alves
2026-10-18 13:02 ` sashiko-bot
2026-10-18 13:30 ` [RFC PATCH v2 0/2] perf: convert Perl test helpers " Breno Rodrigues Alves
2026-10-18 13:30 ` [RFC PATCH v2 1/2] perf/kselftest: convert prefix.pl " Breno Rodrigues Alves
2026-10-18 13:35 ` sashiko-bot [this message]
2026-10-18 13:30 ` [RFC PATCH v2 2/2] perf/tests: convert check_*.pl helpers " Breno Rodrigues Alves
2026-10-18 13:34 ` sashiko-bot
2026-10-18 13:43 ` [RFC PATCH v3 0/2] perf: convert Perl test " Breno Rodrigues Alves
2026-10-18 13:43 ` [RFC PATCH v3 1/2] perf/kselftest: convert prefix.pl " Breno Rodrigues Alves
2026-10-18 13:46 ` sashiko-bot
2026-10-18 13:43 ` [RFC PATCH v3 2/2] perf/tests: convert check_*.pl helpers " Breno Rodrigues Alves
2026-10-18 13:45 ` 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=sashiko-outbox-176156@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=breno3011alves@gmail.com \
--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.