[PATCH i-g-t] tests/device_reset: Skip if no drm devices are present
Nirmoy Das
nirmoy.das at intel.com
Tue Mar 12 11:00:59 UTC 2024
The assert is unnecessary at this early while init phase
of the test so skip the test instead when are no drm devices.
v2: fix a typo.
v3: s/igt_assert_fd/igt_require_fd(Janusz)
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10087
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
tests/device_reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/device_reset.c b/tests/device_reset.c
index 817cbc285..9ec9a213e 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)
* a device file descriptor open for exit handler use.
*/
dev->fds.dev = __drm_open_driver(DRIVER_ANY);
- igt_assert_fd(dev->fds.dev);
+ igt_require_fd(dev->fds.dev);
if (is_i915_device(dev->fds.dev))
igt_require_gem(dev->fds.dev);
--
2.42.0
More information about the igt-dev
mailing list