[igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc
Dixit, Ashutosh
ashutosh.dixit at intel.com
Mon May 17 03:10:20 UTC 2021
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);
> +}
More information about the igt-dev
mailing list