From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] tpci: refactor kernel module
Date: Thu, 6 Aug 2026 10:40:55 +0000 [thread overview]
Message-ID: <20260806104055.4267-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260806-tpci_refactoring-v2-1-bdc3a749ca02@suse.com>
Hi Andrea,
On Thu, Aug 6, 2026, Andrea Cervesato wrote:
> tpci: refactor kernel module
--- [PATCH 2/2] ---
> + for (int i = 0; i < PCI_TCASES_NUM; ++i) {
> + if (i == PCI_DISABLE)
> + continue;
Could the successful PCI_ENABLE and PCI_RESOURCES calls be balanced on all
exit paths instead of unconditionally skipping PCI_DISABLE?
In Linux 7.2, pci_enable_device() increments pci_dev.enable_cnt even when
the device is already enabled, and pci_disable_device() must be called once
for each successful enable. These two test cases therefore leak at least two
enable references per run with -d, and more with -i. Unloading the test module
does not restore that system-wide PCI state.
> + if (!is_target && is_destructive_test(i))
> + continue;
> +
> + SAFE_FILE_PRINTF(DEV_TCASE, "%d", i);
Could PCI_RESOURCES guarantee that the target's original driver is rebound
before this destructive case is enabled?
test_assign_resources() releases the driver before pci_assign_resource(), but
only calls device_attach() when assignment returns zero. It also ignores a
zero or negative device_attach() result and treats -EBUSY from assignment as
TPASS. An assignment or reprobe failure can therefore leave the selected
device unbound after the test, and module cleanup does not restore it.
> Merge kernel module with the current test inside the same folder and
> refactor tpci test using new API.
>
> Now test has a -d option to select device for operating destructive
> tests on target.
Could the commit message explain why the directory merge, API conversion,
and selective destructive execution are needed? The current body only
restates what the patch changes.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-06 10:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 8:10 [LTP] [PATCH v2 0/2] tcpi refactoring Andrea Cervesato
2026-08-06 8:10 ` [LTP] [PATCH v2 1/2] tpci: refactor kernel module Andrea Cervesato
2026-08-06 10:40 ` linuxtestproject.agent [this message]
2026-08-06 8:10 ` [LTP] [PATCH v2 2/2] tpci: refactor test using new API Andrea Cervesato
-- strict thread matches above, loose matches on Subject: below --
2026-08-05 9:44 [LTP] [PATCH 1/2] tpci: refactor kernel module Andrea Cervesato
2026-08-05 10:38 ` [LTP] " linuxtestproject.agent
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=20260806104055.4267-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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