From: sashiko-bot@kernel.org
To: wen.yang@linux.dev
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/5] selftests/verification: Test loadable module-based reactor
Date: Sun, 06 Sep 2026 17:19:08 +0000 [thread overview]
Message-ID: <20260906171909.323171F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <8337c115db6ca718a0d442ad85f0d2d4eaa2422b.1788705281.git.wen.yang@linux.dev>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Typo in the test cleanup trap prevents the script from properly detaching the reactor and unloading the module on test failure.
--
commit fcfb27a313bc6b0b71755c80b19e1e2cbf231cac
Author: Wen Yang <wen.yang@linux.dev>
selftests/verification: Test loadable module-based reactor
Add a selftest module that register an RV reactor and a test that
exercises the module pinning: rmmod must fail while a monitor is
attached to the reactor and succeed after it is detached. A trap
unloads the module on failure so it does not break the next insmod.
> diff --git a/tools/testing/selftests/verification/test.d/rv_reactor_loadable.tc b/tools/testing/selftests/verification/test.d/rv_reactor_loadable.tc
> new file mode 100644
> index 0000000000000..ff16916615215
> --- /dev/null
> +++ b/tools/testing/selftests/verification/test.d/rv_reactor_loadable.tc
> @@ -0,0 +1,46 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# description: Test a loadable module-based reactor
> +# requires: available_reactors insmod:program rmmod:program
> +
> +MODULE_KO="$FTRACETEST_ROOT/test_modules/rv_test_reactor.ko"
> +[ -f "$MODULE_KO" ] || exit_unsupported
> +[ -f /proc/modules ] || exit_unsupported
> +monitor=$(ls monitors | head -n 1)
> +[ -n "$monitor" ] || exit_unsupported
> +
> +cleanup() {
> + if grep -q '^test_reactors$' available_reactors; then
[Severity: Medium]
Is there a typo in this grep pattern? Should it be test_reactor instead of
test_reactors?
If the test fails and triggers the cleanup trap, this condition will evaluate to
false, bypassing the cleanup logic. This leaves the test module loaded and the
reactor attached, which pollutes the test environment for subsequent selftests.
> + echo nop > "monitors/$monitor/reactors" || true
> + rmmod rv_test_reactor || true
> + fi
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1788705281.git.wen.yang@linux.dev?part=5
prev parent reply other threads:[~2026-09-06 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 17:10 [PATCH v5 0/5] rv/reactors: fix lockdep warning and add tests wen.yang
2026-09-06 17:10 ` [PATCH v5 1/5] rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type wen.yang
2026-09-06 17:18 ` sashiko-bot
2026-09-06 17:10 ` [PATCH v5 2/5] rv/reactors: propagate rv_register_reactor() error from reactor init wen.yang
2026-09-06 17:10 ` [PATCH v5 3/5] rv/reactors: export rv_register_reactor() and rv_unregister_reactor() wen.yang
2026-09-11 6:53 ` Gabriele Monaco
2026-09-13 16:33 ` Wen Yang
2026-09-06 17:10 ` [PATCH v5 4/5] rv/reactors: add KUnit tests for reactor registration and dispatch wen.yang
2026-09-06 17:23 ` sashiko-bot
2026-09-06 17:10 ` [PATCH v5 5/5] selftests/verification: Test loadable module-based reactor wen.yang
2026-09-06 17:19 ` 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=20260906171909.323171F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wen.yang@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.