Skip to content

Commit 106fc08

Browse files
bruelcMani-Sadhasivam
authored andcommitted
selftests: pci_endpoint: Skip IRQ test if IRQ is out of range.
The pci_endpoint_test tests the entire MSI/MSI-X range, which generates false errors on platforms that do not support the whole range. Skip the test in such cases and report accordingly. Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> [mani: reworded description] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20250804170916.3212221-4-christian.bruel@foss.st.com
1 parent 384b1b2 commit 106fc08

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/testing/selftests/pci_endpoint/pci_endpoint_test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ TEST_F(pci_ep_basic, MSI_TEST)
121121

122122
for (i = 1; i <= 32; i++) {
123123
pci_ep_ioctl(PCITEST_MSI, i);
124+
if (ret == -EINVAL)
125+
SKIP(return, "MSI%d is disabled", i);
124126
EXPECT_FALSE(ret) TH_LOG("Test failed for MSI%d", i);
125127
}
126128
}
@@ -137,6 +139,8 @@ TEST_F(pci_ep_basic, MSIX_TEST)
137139

138140
for (i = 1; i <= 2048; i++) {
139141
pci_ep_ioctl(PCITEST_MSIX, i);
142+
if (ret == -EINVAL)
143+
SKIP(return, "MSI-X%d is disabled", i);
140144
EXPECT_FALSE(ret) TH_LOG("Test failed for MSI-X%d", i);
141145
}
142146
}

0 commit comments

Comments
 (0)