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

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 29 23:10:47 CET 2014


On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.volkin at intel.com wrote:
> From: Brad Volkin <bradley.d.volkin at intel.com>
> 
> Signed-off-by: Brad Volkin <bradley.d.volkin at 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



More information about the Intel-gfx mailing list