Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: pci_endpoint: Skip reserved BARs

Running a test against a reserved BAR will result in the pci-epf-test
driver returning -ENOBUFS.

Make sure that the pci_endpoint_test selftest will return skip instead of
failure or success for reserved BARs.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Koichiro Den <den@valinux.co.jp>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260312130229.2282001-22-cassel@kernel.org

authored by

Niklas Cassel and committed by
Manivannan Sadhasivam
e022f0c7 c3f33af6

+4
+4
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
··· 67 67 pci_ep_ioctl(PCITEST_BAR, variant->barno); 68 68 if (ret == -ENODATA) 69 69 SKIP(return, "BAR is disabled"); 70 + if (ret == -ENOBUFS) 71 + SKIP(return, "BAR is reserved"); 70 72 EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno); 71 73 } 72 74 ··· 86 84 SKIP(return, "BAR is test register space"); 87 85 if (ret == -EOPNOTSUPP) 88 86 SKIP(return, "Subrange map is not supported"); 87 + if (ret == -ENOBUFS) 88 + SKIP(return, "BAR is reserved"); 89 89 EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno); 90 90 } 91 91