All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_param: Test that you can only set the VM once
@ 2021-07-10 21:19 Jason Ekstrand
  2021-07-10 22:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jason Ekstrand @ 2021-07-10 21:19 UTC (permalink / raw)
  To: igt-dev

We're about to add this restriction to i915 so we should test for it
explicitly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 tests/i915/gem_ctx_param.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index c795f1b45..3b79a3e5e 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -188,6 +188,15 @@ static void test_vm(int i915)
 	gem_vm_destroy(i915, arg.value);
 	igt_assert_eq(err, -EINVAL);
 
+	/* Test that we can't set the VM twice */
+	arg.ctx_id = gem_context_create(i915);
+	arg.value = gem_vm_create(i915);
+	gem_context_set_param(i915, &arg);
+	err = __gem_context_set_param(i915, &arg);
+	gem_vm_destroy(i915, arg.value);
+	gem_context_destroy(i915, arg.ctx_id);
+	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);
-- 
2.31.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-12 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 21:19 [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_param: Test that you can only set the VM once Jason Ekstrand
2021-07-10 22:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-07-10 23:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-12 15:28 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.