[PATCH 0/3] Skip IRQ tests if irq legitimately is out of range

Christian Bruel posted 3 patches 2 months ago
drivers/misc/pci_endpoint_test.c                   | 14 ++++++--------
.../selftests/pci_endpoint/pci_endpoint_test.c     |  4 ++++
2 files changed, 10 insertions(+), 8 deletions(-)
[PATCH 0/3] Skip IRQ tests if irq legitimately is out of range
Posted by Christian Bruel 2 months ago
'pci_endpoint_test' fails for architectures allowing less than 32 MSI
registers and that doesnt support MSI-X, avoid reporting false errors
because of out-of-range irqs.

e.g for an EP configured with 8 msi_interrupts and no msix we can have

 ./pci_endpoint_test -t MSI_TEST

# PASSED: 1 / 1 tests passed.
# 1 skipped test(s) detected. Consider enabling relevant config options to improve coverage.
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0

instead of

# FAILED: 0 / 1 tests passed
# Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0

An alternative could have been to implement VARIANTs so that the harness
runs only the supported tests, but that seems quite heavy considering the
huge number of possible interrupts.

Another alternative could also have been to use a new ioctl to get the
allocated number of irqs from the driver, but that doesn't seem to be
more efficient than just using -EINVAL when the
irq is out of range.

thank you for your feedback

Christian Bruel (3):
  misc: pci_endpoint_test: Skip IRQ tests if irq is out of range
  misc: pci_endpoint_test: Cleanup extra 0 initialization
  selftests: pci_endpoint: Skip IRQ test if irq is out of range.

 drivers/misc/pci_endpoint_test.c                   | 14 ++++++--------
 .../selftests/pci_endpoint/pci_endpoint_test.c     |  4 ++++
 2 files changed, 10 insertions(+), 8 deletions(-)

-- 
2.34.1
Re: [PATCH 0/3] Skip IRQ tests if irq legitimately is out of range
Posted by Manivannan Sadhasivam 1 month, 1 week ago
On Mon, 04 Aug 2025 19:09:13 +0200, Christian Bruel wrote:
> 'pci_endpoint_test' fails for architectures allowing less than 32 MSI
> registers and that doesnt support MSI-X, avoid reporting false errors
> because of out-of-range irqs.
> 
> e.g for an EP configured with 8 msi_interrupts and no msix we can have
> 
>  ./pci_endpoint_test -t MSI_TEST
> 
> [...]

Applied, thanks!

[1/3] misc: pci_endpoint_test: Skip IRQ tests if irq is out of range
      commit: cc8e391067164f45f89b6132a5aaa18c33a0e32b
[2/3] misc: pci_endpoint_test: Cleanup extra 0 initialization
      commit: 384b1b29481e39aae8eb01240d1edf287c7a4145
[3/3] selftests: pci_endpoint: Skip IRQ test if irq is out of range.
      commit: 106fc08b30a2ece49a251b053165a83d41d50fd0

Best regards,
-- 
Manivannan Sadhasivam <mani@kernel.org>