[PATCH 2/2] device_reset: Require a PCI device

Rob Clark robdclark at gmail.com
Wed Aug 14 18:54:26 UTC 2024


From: Rob Clark <robdclark at chromium.org>

Too much baked in assumptions that the drm device is a PCI device.

Signed-off-by: Rob Clark <robdclark at chromium.org>
---
 tests/device_reset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/device_reset.c b/tests/device_reset.c
index 8ed3ef5220fc..c49f94e2faed 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -200,6 +200,7 @@ static void init_device_fds(struct device_fds *dev)
 		igt_require_gem(dev->fds.dev);
 
 	igt_assert(device_sysfs_path(dev->fds.dev, dev_path));
+	igt_require(strstr(dev_path, "/sys/devices/pci") == dev_path);
 	addr_pos = strrchr(dev_path, '/');
 	igt_assert(addr_pos);
 	igt_assert_eq(sizeof(dev->dev_bus_addr) - 1,
-- 
2.46.0



More information about the igt-dev mailing list