From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6597310F952 for ; Mon, 18 Jul 2022 22:50:43 +0000 (UTC) Date: Mon, 18 Jul 2022 15:50:41 -0700 Message-ID: <87y1wqavcu.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: igt-dev@lists.freedesktop.org In-Reply-To: <20220718223205.1629532-1-ashutosh.dixit@intel.com> References: <20220718223205.1629532-1-ashutosh.dixit@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t] tests/perf/i915_ref_count: Skip on __drm_open_driver failure List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Mon, 18 Jul 2022 15:32:05 -0700, Ashutosh Dixit wrote: > > 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 > Signed-off-by: Ashutosh Dixit > --- > 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); The other option might be to use igt_require_fd() here (or something like that) which would be closer to the signature CI expects from drm_open_driver(). At the other place in perf.c __drm_open_driver() is followed by igt_require_gem() which skips using igt_require_intel() and that's why I used igt_require_intel() here (instead of other options). Maybe as long as we are skipping one way or another (and not asserting) it should be ok? > devid = intel_get_drm_devid(drm_fd); > sysfs = igt_sysfs_open(drm_fd); > > -- > 2.34.1 >