lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206172646.1556847-10-den@valinux.co.jp>
Date: Sat,  7 Feb 2026 02:26:46 +0900
From: Koichiro Den <den@...inux.co.jp>
To: vkoul@...nel.org,
	mani@...nel.org,
	Frank.Li@....com,
	jingoohan1@...il.com,
	lpieralisi@...nel.org,
	kwilczynski@...nel.org,
	robh@...nel.org,
	bhelgaas@...gle.com
Cc: dmaengine@...r.kernel.org,
	linux-pci@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH v4 9/9] selftests: pci_endpoint: Exercise MSI and embedded doorbell

Extend the pci_endpoint_test doorbell selftest to run in two variants:
  - default MSI doorbell,
  - embedded doorbell (requested via the PCITEST_DOORBELL ioctl
    argument).

This improves coverage of EPC backends that implement embedded doorbell
support.

Signed-off-by: Koichiro Den <den@...inux.co.jp>
---
 .../selftests/pci_endpoint/pci_endpoint_test.c  | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
index eecb776c33af..b3c79fe3b828 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -268,6 +268,21 @@ FIXTURE_TEARDOWN(pcie_ep_doorbell)
 	close(self->fd);
 };
 
+FIXTURE_VARIANT(pcie_ep_doorbell)
+{
+	bool use_embedded_db;
+};
+
+FIXTURE_VARIANT_ADD(pcie_ep_doorbell, msi)
+{
+	.use_embedded_db = false,
+};
+
+FIXTURE_VARIANT_ADD(pcie_ep_doorbell, embedded)
+{
+	.use_embedded_db = true,
+};
+
 TEST_F(pcie_ep_doorbell, DOORBELL_TEST)
 {
 	int ret;
@@ -275,7 +290,7 @@ TEST_F(pcie_ep_doorbell, DOORBELL_TEST)
 	pci_ep_ioctl(PCITEST_SET_IRQTYPE, PCITEST_IRQ_TYPE_AUTO);
 	ASSERT_EQ(0, ret) TH_LOG("Can't set AUTO IRQ type");
 
-	pci_ep_ioctl(PCITEST_DOORBELL, 0);
+	pci_ep_ioctl(PCITEST_DOORBELL, variant->use_embedded_db);
 	EXPECT_FALSE(ret) TH_LOG("Test failed for Doorbell\n");
 }
 TEST_HARNESS_MAIN
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ