From: Christian Bruel <christian.bruel@foss.st.com>
To: <mani@kernel.org>, <kwilczynski@kernel.org>, <kishon@kernel.org>,
<arnd@arndb.de>, <gregkh@linuxfoundation.org>, <shuah@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>,
Christian Bruel <christian.bruel@foss.st.com>
Subject: [PATCH 3/3] selftests: pci_endpoint: Skip IRQ test if irq is out of range.
Date: Mon, 4 Aug 2025 19:09:16 +0200 [thread overview]
Message-ID: <20250804170916.3212221-4-christian.bruel@foss.st.com> (raw)
In-Reply-To: <20250804170916.3212221-1-christian.bruel@foss.st.com>
The pcie_endpoint_framework tests the entire MSI(x) range, which generate
false errors on platforms that do not support the whole range.
This patch skips the test in such cases and reports accordingly.
Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
---
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 da0db0e7c969..cd9075444c32 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -121,6 +121,8 @@ TEST_F(pci_ep_basic, MSI_TEST)
for (i = 1; i <= 32; i++) {
pci_ep_ioctl(PCITEST_MSI, i);
+ if (ret == -EINVAL)
+ SKIP(return, "MSI%d is disabled", i);
EXPECT_FALSE(ret) TH_LOG("Test failed for MSI%d", i);
}
}
@@ -137,6 +139,8 @@ TEST_F(pci_ep_basic, MSIX_TEST)
for (i = 1; i <= 2048; i++) {
pci_ep_ioctl(PCITEST_MSIX, i);
+ if (ret == -EINVAL)
+ SKIP(return, "MSI-X%d is disabled", i);
EXPECT_FALSE(ret) TH_LOG("Test failed for MSI-X%d", i);
}
}
--
2.34.1
next prev parent reply other threads:[~2025-08-04 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 17:09 [PATCH 0/3] Skip IRQ tests if irq legitimately is out of range Christian Bruel
2025-08-04 17:09 ` [PATCH 1/3] misc: pci_endpoint_test: Skip IRQ tests if irq " Christian Bruel
2025-08-04 17:09 ` [PATCH 2/3] misc: pci_endpoint_test: Cleanup extra 0 initialization Christian Bruel
2025-08-04 17:09 ` Christian Bruel [this message]
2025-08-27 13:15 ` [PATCH 0/3] Skip IRQ tests if irq legitimately is out of range Manivannan Sadhasivam
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=20250804170916.3212221-4-christian.bruel@foss.st.com \
--to=christian.bruel@foss.st.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@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;
as well as URLs for NNTP newsgroup(s).