[igt-dev] [PATCH i-g-t] tests/perf/i915_ref_count: Skip on __drm_open_driver failure

Ashutosh Dixit ashutosh.dixit at intel.com
Mon Jul 18 22:32:05 UTC 2022


Skip early on __drm_open_driver() to generate a consistent failure
signature for CI (rather than a follow-on igt_assert(is_i915_device(fd))).

Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 tests/i915/perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index e641d5d2db7e..5502a3fb4e59 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -4838,6 +4838,7 @@ test_i915_ref_count(void)
 	igt_debug("baseline ref count (drm fd closed) = %u\n", baseline);
 
 	drm_fd = __drm_open_driver(DRIVER_INTEL);
+	igt_require_intel(drm_fd);
 	devid = intel_get_drm_devid(drm_fd);
 	sysfs = igt_sysfs_open(drm_fd);
 
-- 
2.34.1



More information about the igt-dev mailing list