From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl
Date: Tue, 5 Feb 2013 12:26:49 +0200 [thread overview]
Message-ID: <1360060009-17707-1-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <20130204162725.GG5843@phenom.ffwll.local>
Call context destroy with proper ioctl number and
add test to verify that we can't post batchbuffers
with destroyed context.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/gem_ctx_exec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 423f1ee..b0362cc 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -57,7 +57,7 @@ struct local_drm_i915_gem_context_destroy {
};
#define CONTEXT_CREATE_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2d, struct local_drm_i915_gem_context_create)
-#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x23, struct local_drm_i915_gem_context_destroy)
+#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2e, struct local_drm_i915_gem_context_destroy)
static uint32_t context_create(int fd)
{
@@ -135,5 +135,7 @@ int main(int argc, char *argv[])
assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0);
context_destroy(fd, ctx_id);
+ assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) < 0);
+
exit(EXIT_SUCCESS);
}
--
1.7.9.5
next prev parent reply other threads:[~2013-02-05 10:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 13:13 [PATCH 1/1] tests/gem_ctx_exec: fix destroy ioctl number Mika Kuoppala
2013-02-04 16:27 ` Daniel Vetter
2013-02-05 10:26 ` Mika Kuoppala [this message]
2013-02-05 11:06 ` [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl 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=1360060009-17707-1-git-send-email-mika.kuoppala@intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox