[igt-dev] [PATCH i-g-t 76/79] tests/i915/gem_ctx_param: Add a couple invalid PARAM_VM cases
Dixit, Ashutosh
ashutosh.dixit at intel.com
Wed Jun 23 03:10:53 UTC 2021
On Thu, 17 Jun 2021 12:15:13 -0700, Jason Ekstrand wrote:
>
Please add SOB, otherwise:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> ---
> tests/i915/gem_ctx_param.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
> index 7fba37cbd..c795f1b45 100644
> --- a/tests/i915/gem_ctx_param.c
> +++ b/tests/i915/gem_ctx_param.c
> @@ -181,6 +181,23 @@ static void test_vm(int i915)
> gem_context_destroy(i915, arg.ctx_id);
> igt_require(err == -ENOENT);
>
> + /* Test that we can't set the VM on ctx0 */
> + arg.ctx_id = 0;
> + arg.value = gem_vm_create(i915);
> + err = __gem_context_set_param(i915, &arg);
> + gem_vm_destroy(i915, arg.value);
> + igt_assert_eq(err, -EINVAL);
> +
> + /* Test that we can't set the VM after we've done an execbuf */
> + arg.ctx_id = gem_context_create(i915);
> + spin = igt_spin_new(i915, .ctx_id = arg.ctx_id);
> + igt_spin_free(i915, spin);
> + arg.value = gem_vm_create(i915);
> + err = __gem_context_set_param(i915, &arg);
> + gem_context_destroy(i915, arg.ctx_id);
> + gem_vm_destroy(i915, arg.value);
> + igt_assert_eq(err, -EINVAL);
> +
> parent = gem_context_create(i915);
> child = gem_context_create(i915);
>
> --
> 2.31.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list