From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: kw@linux.com, gregkh@linuxfoundation.org, arnd@arndb.de,
lpieralisi@kernel.org, shuah@kernel.org, kishon@kernel.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
bhelgaas@google.com, linux-arm-msm@vger.kernel.org,
robh@kernel.org, linux-kselftest@vger.kernel.org,
Aman Gupta <aman1.gupta@samsung.com>,
Padmanabhan Rajanbabu <p.rajanbabu@samsung.com>
Subject: Re: [PATCH v4 3/3] selftests: pci_endpoint: Migrate to Kselftest framework
Date: Tue, 31 Dec 2024 18:42:42 +0100 [thread overview]
Message-ID: <Z3QtEihbiKIGogWA@ryzen> (raw)
In-Reply-To: <20241231131341.39292-4-manivannan.sadhasivam@linaro.org>
On Tue, Dec 31, 2024 at 06:43:41PM +0530, Manivannan Sadhasivam wrote:
(...)
> + # RUN pci_ep_data_transfer.dma.COPY_TEST ...
> + # OK pci_ep_data_transfer.dma.COPY_TEST
> + ok 11 pci_ep_data_transfer.dma.COPY_TEST
> + # PASSED: 11 / 11 tests passed.
> + # Totals: pass:11 fail:0 xfail:0 xpass:0 skip:0 error:0
> +
> +
> +Testcase 11 (pci_ep_data_transfer.dma.COPY_TEST) will fail for most of the DMA
> +capable endpoint controllers due to the absence of the MEMCPY over DMA. For such
> +controllers, it is advisable to skip the forementioned testcase using below
> +command::
Hm.. this is strictly not correct. If will currently fail because pci-epf-test.c
does:
if ((reg->flags & FLAG_USE_DMA) && epf_test->dma_private)
return -EINVAL;
So even if a DMA driver has support for the DMA_MEMCPY cap, if the DMA driver
also has the DMA_PRIVATE cap, this test will fail because of the code in
pci-epf-test.c.
Not sure how to formulate this properly... Perhaps:
Testcase 11 (pci_ep_data_transfer.dma.COPY_TEST) will fail for DMA drivers that
have the DMA_PRIVATE cap set. For DMA drivers which have the DMA_PRIVATE cap
set, it is advisable to skip the forementioned testcase using below command::
> +
> + # pci_endpoint_test -f pci_ep_basic -v memcpy -T COPY_TEST -v dma
Is this really correct? I would guess that it should be
pci_endpoint_test -f pci_ep_data_transfer -v memcpy -T COPY_TEST -v dma
(...)
> +TEST_F(pci_ep_basic, BAR_TEST)
> +{
> + int ret, i;
> +
> + for (i = 0; i <= 5; i++) {
> + pci_ep_ioctl(PCITEST_BAR, i);
> + EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", i);
> + }
> +}
From looking at this function, will we still be able to test a single BAR?
Previous pcitest.c allowed us to do pcitest -b <barno> to only test a
specific BAR. I think that is a useful feature that we shouldn't remove.
It would be nice if we could do something like:
# pci_endpoint_test -f pci_ep_basic -T BAR_TEST -v <barno>
(...)
> +
> +TEST_F(pci_ep_data_transfer, COPY_TEST)
> +{
> + struct pci_endpoint_test_xfer_param param = {0};
This (also other places in this file) can be written as:
struct pci_endpoint_test_xfer_param param = {};
Kind regards,
Niklas
next prev parent reply other threads:[~2024-12-31 17:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 13:13 [PATCH v4 0/3] Migrate PCI Endpoint Subsystem tests to Kselftest Manivannan Sadhasivam
2024-12-31 13:13 ` [PATCH v4 1/3] misc: pci_endpoint_test: Fix the return value of IOCTL Manivannan Sadhasivam
2024-12-31 16:57 ` Niklas Cassel
2024-12-31 18:51 ` Manivannan Sadhasivam
2024-12-31 13:13 ` [PATCH v4 2/3] selftests: Move PCI Endpoint tests from tools/pci to Kselftests Manivannan Sadhasivam
2024-12-31 17:17 ` Niklas Cassel
2024-12-31 18:53 ` Manivannan Sadhasivam
2024-12-31 13:13 ` [PATCH v4 3/3] selftests: pci_endpoint: Migrate to Kselftest framework Manivannan Sadhasivam
2024-12-31 17:42 ` Niklas Cassel [this message]
2024-12-31 19:18 ` Manivannan Sadhasivam
2024-12-31 19:33 ` Niklas Cassel
2025-01-02 7:04 ` Manivannan Sadhasivam
2025-01-02 14:23 ` Niklas Cassel
2025-01-16 4:47 ` Manivannan Sadhasivam
2025-01-16 10:30 ` Niklas Cassel
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=Z3QtEihbiKIGogWA@ryzen \
--to=cassel@kernel.org \
--cc=aman1.gupta@samsung.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=p.rajanbabu@samsung.com \
--cc=robh@kernel.org \
--cc=shuah@kernel.org \
/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