diff options
| author | Christian Bruel <christian.bruel@foss.st.com> | 2026-04-07 15:04:08 +0300 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-04-08 22:41:39 +0300 |
| commit | 1d3225cb5d82680143ffd705088199917ceafd76 (patch) | |
| tree | 58983fc5c1f4c9df9ee9eb532d9b9198c1b1de15 /tools | |
| parent | 5ab7a225888baa5474def18ba3b0a298d27e6ba0 (diff) | |
| download | linux-1d3225cb5d82680143ffd705088199917ceafd76.tar.xz | |
selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC
In pci-epf-test.c, set the STATUS_NO_RESOURCE status bit if
pci_epc_set_bar() returns -ENOSPC. This status bit is used to indicate
that there are not enough inbound window resources to allocate the
subrange.
In pci_endpoint_test.c, return -ENOSPC instead of -EIO when
STATUS_NO_RESOURCE is set.
In pci_endpoint_test.c, skip the BAR subrange test if -ENOSPC, i.e., there
are not enough inbound window resources to run the test.
Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
[mani: commit log]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: squash related commits]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Koichiro Den <den@valinux.co.jp>
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-1-6f2e65f2298c@foss.st.com
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-2-6f2e65f2298c@foss.st.com
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-3-6f2e65f2298c@foss.st.com
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c index c417fb3a198b..588d75c97ad1 100644 --- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c +++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c @@ -88,6 +88,8 @@ TEST_F(pci_ep_bar, BAR_SUBRANGE_TEST) SKIP(return, "Subrange map is not supported"); if (ret == -ENOBUFS) SKIP(return, "BAR is reserved"); + if (ret == -ENOSPC) + SKIP(return, "Not enough inbound windows"); EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno); } |
