All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Ekstrand <jason@jlekstrand.net>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_param: Test that you can only set the VM once
Date: Sat, 10 Jul 2021 16:19:23 -0500	[thread overview]
Message-ID: <20210710211923.784638-1-jason@jlekstrand.net> (raw)

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

             reply	other threads:[~2021-07-10 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 21:19 Jason Ekstrand [this message]
2021-07-10 22:00 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_ctx_param: Test that you can only set the VM once 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210710211923.784638-1-jason@jlekstrand.net \
    --to=jason@jlekstrand.net \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.