[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250220074122.xaeefquqwh2xwsxz@thinkpad>
Date: Thu, 20 Feb 2025 13:11:22 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Cc: Krzysztof Wilczynski <kw@...ux.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v3 3/5] misc: pci_endpoint_test: Fix irq_type to convey
the correct type
On Mon, Feb 17, 2025 at 08:26:44PM +0900, Kunihiko Hayashi wrote:
> Hi Manivannan,
>
> On 2025/02/15 2:25, Manivannan Sadhasivam wrote:
> > On Mon, Feb 10, 2025 at 04:58:10PM +0900, Kunihiko Hayashi wrote:
> > > There are two variables that indicate the interrupt type to be used
> > > in the next test execution, "irq_type" as global and test->irq_type.
> > >
> > > The global is referenced from pci_endpoint_test_get_irq() to preserve
> > > the current type for ioctl(PCITEST_GET_IRQTYPE).
> > >
> > > The type set in this function isn't reflected in the global "irq_type",
> > > so ioctl(PCITEST_GET_IRQTYPE) returns the previous type.
> > > As a result, the wrong type will be displayed in "pcitest" as follows:
> > >
> > > # pcitest -i 0
> > > SET IRQ TYPE TO LEGACY: OKAY
> > > # pcitest -I
> > > GET IRQ TYPE: MSI
> > >
> >
> > Could you please post the failure with kselftest that got merged into
> > v6.14-rc1?
>
> The kselftest doesn't call GET_IRQTYPE, so current kselftest doesn't fail.
>
> If necessary, I can add GET_IRQTYPE test after SET_IRQTYPE of each
> interrupt test prior to this patch.
>
> pci_ep_ioctl(PCITEST_SET_IRQTYPE, 0);
> ASSERT_EQ(0, ret) TH_LOG("Can't set Legacy IRQ type");
>
> + pci_ep_ioctl(PCITEST_GET_IRQTYPE, 0);
> + ASSERT_EQ(0, ret) TH_LOG("Can't get Legacy IRQ type");
>
Sure.
> However, pci_ep_ioctl() returns zero if OK, the return value should be
> changed to the actual return value.
>
> #define pci_ep_ioctl(cmd, arg) \
> ({ \
> ret = ioctl(self->fd, cmd, arg); \
> - ret = ret < 0 ? -errno : 0; \
> + ret = ret < 0 ? -errno : ret; \
> })
>
Ok.
> Before applying the patch, this test fails.
>
> # RUN pci_ep_basic.LEGACY_IRQ_TEST ...
> # pci_endpoint_test.c:104:LEGACY_IRQ_TEST:Expected 0 (0) == ret (1)
> # pci_endpoint_test.c:104:LEGACY_IRQ_TEST:Can't get Legacy IRQ type
> # LEGACY_IRQ_TEST: Test terminated by assertion
> # FAIL pci_ep_basic.LEGACY_IRQ_TEST
>
Looks good to me.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists