summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2018-05-09 12:43:55 +0100
committerMichaƂ Winiarski <michal.winiarski@intel.com>2018-05-14 12:46:34 +0200
commit395c23946b44b071cc376f488a3205bedb02b382 (patch)
tree11bcce54fac92594cb26ca8eabc0c7fdcdec75dd /tests
parent03a62cf055481f66b4f58e6228bc45f8ca454216 (diff)
tests/gem_userptr_blits: test zero user_size
Check that the kernel rejects a zero user_size. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_userptr_blits.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/gem_userptr_blits.c b/tests/gem_userptr_blits.c
index 849054ad..7e3b6ef3 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -442,6 +442,14 @@ static int test_input_checking(int fd)
ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr);
igt_assert_neq(ret, 0);
+ /* Zero user_size. */
+ memset(&userptr, 0, sizeof(userptr));
+ userptr.user_ptr = 0;
+ userptr.user_size = 0;
+ userptr.flags = 0;
+ ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr);
+ igt_assert_neq(ret, 0);
+
return 0;
}