linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 0/3] Skip IRQ tests if irq legitimately is out of range
Date: Mon, 4 Aug 2025 19:09:13 +0200	[thread overview]
Message-ID: <20250804170916.3212221-1-christian.bruel@foss.st.com> (raw)

'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


             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 Christian Bruel [this message]
2025-08-04 17:09 ` [PATCH 1/3] misc: pci_endpoint_test: Skip IRQ tests if irq is out of range 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 ` [PATCH 3/3] selftests: pci_endpoint: Skip IRQ test if irq is out of range Christian Bruel
2025-08-27 13:15 ` [PATCH 0/3] Skip IRQ tests if irq legitimately " 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-1-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).