From: Niklas Cassel <cassel@kernel.org>
To: "Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Shuah Khan" <shuah@kernel.org>
Cc: Manikanta Maddireddy <mmaddireddy@nvidia.com>,
Koichiro Den <den@valinux.co.jp>,
Damien Le Moal <dlemoal@kernel.org>,
Niklas Cassel <cassel@kernel.org>, Frank Li <Frank.Li@nxp.com>,
linux-pci@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH v3 9/9] selftests: pci_endpoint: Skip reserved BARs
Date: Mon, 2 Mar 2026 10:59:21 +0100 [thread overview]
Message-ID: <20260302095913.48155-20-cassel@kernel.org> (raw)
In-Reply-To: <20260302095913.48155-11-cassel@kernel.org>
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.
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Tested-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
index e0dbbb2af8c7..c417fb3a198b 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -67,6 +67,8 @@ TEST_F(pci_ep_bar, BAR_TEST)
pci_ep_ioctl(PCITEST_BAR, variant->barno);
if (ret == -ENODATA)
SKIP(return, "BAR is disabled");
+ if (ret == -ENOBUFS)
+ SKIP(return, "BAR is reserved");
EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
}
@@ -84,6 +86,8 @@ TEST_F(pci_ep_bar, BAR_SUBRANGE_TEST)
SKIP(return, "BAR is test register space");
if (ret == -EOPNOTSUPP)
SKIP(return, "Subrange map is not supported");
+ if (ret == -ENOBUFS)
+ SKIP(return, "BAR is reserved");
EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
}
--
2.53.0
next prev parent reply other threads:[~2026-03-02 10:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 9:59 [PATCH v3 0/9] PCI: endpoint: Differentiate between disabled and reserved BARs Niklas Cassel
2026-03-02 9:59 ` Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 1/9] PCI: endpoint: Introduce pci_epc_bar_type BAR_64BIT_UPPER Niklas Cassel
2026-03-11 6:35 ` Manivannan Sadhasivam
2026-03-11 10:38 ` Niklas Cassel
2026-03-11 17:12 ` Manivannan Sadhasivam
2026-03-02 9:59 ` [PATCH v3 2/9] PCI: endpoint: Describe reserved subregions within BARs Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 3/9] PCI: dw-rockchip: Describe RK3588 BAR4 DMA ctrl window Niklas Cassel
2026-03-02 9:59 ` Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 4/9] PCI: endpoint: Introduce pci_epc_bar_type BAR_DISABLED Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 5/9] PCI: dwc: Replace certain BAR_RESERVED with BAR_DISABLED in glue drivers Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 6/9] PCI: dwc: Disable BARs in common code instead of in each glue driver Niklas Cassel
2026-03-02 9:59 ` Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 7/9] PCI: endpoint: pci-epf-test: Advertise reserved BARs Niklas Cassel
2026-03-02 9:59 ` [PATCH v3 8/9] misc: pci_endpoint_test: Give reserved BARs a distinct error code Niklas Cassel
2026-03-02 9:59 ` Niklas Cassel [this message]
2026-03-10 9:54 ` [PATCH v3 0/9] PCI: endpoint: Differentiate between disabled and reserved BARs 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=20260302095913.48155-20-cassel@kernel.org \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=den@valinux.co.jp \
--cc=dlemoal@kernel.org \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mmaddireddy@nvidia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.