Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/gem_userptr_blits: test zero user_size
@ 2018-05-09 11:43 Matthew Auld
  2018-05-11  9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_userptr_blits: test zero user_size (rev2) Patchwork
  2018-05-11 10:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Auld @ 2018-05-09 11:43 UTC (permalink / raw)
  To: igt-dev

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>
---
 tests/gem_userptr_blits.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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;
 }
 
-- 
2.17.0

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

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

end of thread, other threads:[~2018-05-11 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09 11:43 [igt-dev] [PATCH i-g-t] tests/gem_userptr_blits: test zero user_size Matthew Auld
2018-05-11  9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_userptr_blits: test zero user_size (rev2) Patchwork
2018-05-11 10:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox