Re: [PATCH v4 3/3] selftests: pci_endpoint: Migrate to Kselftest framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
> +	}
> +}


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux