From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 962EB6E030 for ; Mon, 17 May 2021 03:10:23 +0000 (UTC) Date: Sun, 16 May 2021 20:10:20 -0700 Message-ID: <875yzirr6r.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210515230142.1816456-5-alan.previn.teres.alexis@intel.com> References: <20210515230142.1816456-1-alan.previn.teres.alexis@intel.com> <20210515230142.1816456-5-alan.previn.teres.alexis@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Alan Previn Cc: igt-dev@lists.freedesktop.org List-ID: On Sat, 15 May 2021 16:01:29 -0700, Alan Previn wrote: > > +static void test_ctx_mod_protected_on_to_off(int i915) > +{ > + int ret; > + uint32_t ctx; > + > + ret = create_ctx_with_params(i915, true, true, true, false, &ctx); > + igt_assert_eq(ret, 0); If we are going to spin another rev, I'd follow a uniform style here. That is, have a single statement which combines the function call and the igt_assert_eq as is done below (basically get rid of ret if possible). > + igt_assert_eq(get_ctx_protected_param(i915, ctx), 1); > + igt_assert_eq(get_ctx_recovery_param(i915, ctx), 0); > + ret = modify_ctx_param(i915, ctx, CHANGE_PARAM_PROTECTED, false); > + igt_assert_eq(ret, -EPERM); > + igt_assert_eq(get_ctx_protected_param(i915, ctx), 1); > + igt_assert_eq(get_ctx_recovery_param(i915, ctx), 0); > + gem_context_destroy(i915, ctx); > +} _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev