Re: [Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-03-25 Thread Daniel Vetter
On Thu, Jan 30, 2014 at 11:46:15AM +, Chris Wilson wrote:
 On Wed, Jan 29, 2014 at 10:10:47PM +, Chris Wilson wrote:
  On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.vol...@intel.com wrote:
   From: Brad Volkin bradley.d.vol...@intel.com
   
   Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
   ---
tests/gem_exec_parse.c | 9 +
1 file changed, 9 insertions(+)
   
   diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
   index 9e90408..004c3bf 100644
   --- a/tests/gem_exec_parse.c
   +++ b/tests/gem_exec_parse.c
   @@ -257,6 +257,15 @@ igt_main
   -EINVAL));
 }

   + igt_subtest(batch-without-end) {
   + uint32_t noop[1024] = { 0 };
   + igt_assert(
   +exec_batch(fd, handle,
   +   noop, sizeof(noop),
   +   I915_EXEC_RENDER,
   +   -EINVAL));
  
  Cheekier would be
  uint32_t empty[] = { MI_NOOP, MI_NOOP, MI_BATCH_BUFFER_END, 0 };
  for_each_ring() {
  igt_assert(exec_batch(fd, handle, empty, sizeof(empty), ring, 0));
  igt_assert(exec_batch(fd, handle, empty, 8, ring, -EINVAL));
  }
 
 On this subject, it should be
 { INVALID, INVALID, NOOP, NOOP, END, 0}
 assert(exec(0,  4) == -EINVAL);
 assert(exec(0,  8) == -EINVAL);
 assert(exec(0, 12) == -EINVAL);
 assert(exec(4,  8) == -EINVAL);
 assert(exec(4, 12) == 0);
 assert(exec(8, 12) == 0);

Brad, care to throw this nasties into the test pond, too?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-03-25 Thread Volkin, Bradley D
On Tue, Mar 25, 2014 at 06:17:55AM -0700, Daniel Vetter wrote:
 On Thu, Jan 30, 2014 at 11:46:15AM +, Chris Wilson wrote:
  On Wed, Jan 29, 2014 at 10:10:47PM +, Chris Wilson wrote:
   On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.vol...@intel.com 
   wrote:
From: Brad Volkin bradley.d.vol...@intel.com

Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
---
 tests/gem_exec_parse.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index 9e90408..004c3bf 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -257,6 +257,15 @@ igt_main
  -EINVAL));
}
 
+   igt_subtest(batch-without-end) {
+   uint32_t noop[1024] = { 0 };
+   igt_assert(
+  exec_batch(fd, handle,
+ noop, sizeof(noop),
+ I915_EXEC_RENDER,
+ -EINVAL));
   
   Cheekier would be
   uint32_t empty[] = { MI_NOOP, MI_NOOP, MI_BATCH_BUFFER_END, 0 };
   for_each_ring() {
 igt_assert(exec_batch(fd, handle, empty, sizeof(empty), ring, 0));
 igt_assert(exec_batch(fd, handle, empty, 8, ring, -EINVAL));
   }
  
  On this subject, it should be
  { INVALID, INVALID, NOOP, NOOP, END, 0}
  assert(exec(0,  4) == -EINVAL);
  assert(exec(0,  8) == -EINVAL);
  assert(exec(0, 12) == -EINVAL);
  assert(exec(4,  8) == -EINVAL);
  assert(exec(4, 12) == 0);
  assert(exec(8, 12) == 0);
 
 Brad, care to throw this nasties into the test pond, too?

Yeah, I can add that.

 -Daniel
 -- 
 Daniel Vetter
 Software Engineer, Intel Corporation
 +41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-02-18 Thread bradley . d . volkin
From: Brad Volkin bradley.d.vol...@intel.com

Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
---
 tests/gem_exec_parse.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index 9e90408..004c3bf 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -257,6 +257,15 @@ igt_main
  -EINVAL));
}
 
+   igt_subtest(batch-without-end) {
+   uint32_t noop[1024] = { 0 };
+   igt_assert(
+  exec_batch(fd, handle,
+ noop, sizeof(noop),
+ I915_EXEC_RENDER,
+ -EINVAL));
+   }
+
igt_fixture {
gem_close(fd, handle);
 
-- 
1.8.3.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-01-30 Thread Chris Wilson
On Wed, Jan 29, 2014 at 10:10:47PM +, Chris Wilson wrote:
 On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.vol...@intel.com wrote:
  From: Brad Volkin bradley.d.vol...@intel.com
  
  Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
  ---
   tests/gem_exec_parse.c | 9 +
   1 file changed, 9 insertions(+)
  
  diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
  index 9e90408..004c3bf 100644
  --- a/tests/gem_exec_parse.c
  +++ b/tests/gem_exec_parse.c
  @@ -257,6 +257,15 @@ igt_main
-EINVAL));
  }
   
  +   igt_subtest(batch-without-end) {
  +   uint32_t noop[1024] = { 0 };
  +   igt_assert(
  +  exec_batch(fd, handle,
  + noop, sizeof(noop),
  + I915_EXEC_RENDER,
  + -EINVAL));
 
 Cheekier would be
 uint32_t empty[] = { MI_NOOP, MI_NOOP, MI_BATCH_BUFFER_END, 0 };
 for_each_ring() {
   igt_assert(exec_batch(fd, handle, empty, sizeof(empty), ring, 0));
   igt_assert(exec_batch(fd, handle, empty, 8, ring, -EINVAL));
 }

On this subject, it should be
{ INVALID, INVALID, NOOP, NOOP, END, 0}
assert(exec(0,  4) == -EINVAL);
assert(exec(0,  8) == -EINVAL);
assert(exec(0, 12) == -EINVAL);
assert(exec(4,  8) == -EINVAL);
assert(exec(4, 12) == 0);
assert(exec(8, 12) == 0);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-01-29 Thread bradley . d . volkin
From: Brad Volkin bradley.d.vol...@intel.com

Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
---
 tests/gem_exec_parse.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index 9e90408..004c3bf 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -257,6 +257,15 @@ igt_main
  -EINVAL));
}
 
+   igt_subtest(batch-without-end) {
+   uint32_t noop[1024] = { 0 };
+   igt_assert(
+  exec_batch(fd, handle,
+ noop, sizeof(noop),
+ I915_EXEC_RENDER,
+ -EINVAL));
+   }
+
igt_fixture {
gem_close(fd, handle);
 
-- 
1.8.3.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END

2014-01-29 Thread Chris Wilson
On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.vol...@intel.com wrote:
 From: Brad Volkin bradley.d.vol...@intel.com
 
 Signed-off-by: Brad Volkin bradley.d.vol...@intel.com
 ---
  tests/gem_exec_parse.c | 9 +
  1 file changed, 9 insertions(+)
 
 diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
 index 9e90408..004c3bf 100644
 --- a/tests/gem_exec_parse.c
 +++ b/tests/gem_exec_parse.c
 @@ -257,6 +257,15 @@ igt_main
 -EINVAL));
   }
  
 + igt_subtest(batch-without-end) {
 + uint32_t noop[1024] = { 0 };
 + igt_assert(
 +exec_batch(fd, handle,
 +   noop, sizeof(noop),
 +   I915_EXEC_RENDER,
 +   -EINVAL));

Cheekier would be
uint32_t empty[] = { MI_NOOP, MI_NOOP, MI_BATCH_BUFFER_END, 0 };
for_each_ring() {
igt_assert(exec_batch(fd, handle, empty, sizeof(empty), ring, 0));
igt_assert(exec_batch(fd, handle, empty, 8, ring, -EINVAL));
}

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx