From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 5/6] tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END Date: Tue, 25 Mar 2014 14:17:55 +0100 Message-ID: <20140325131755.GD26878@phenom.ffwll.local> References: <1385484699-51596-1-git-send-email-bradley.d.volkin@intel.com> <1391032710-19272-1-git-send-email-bradley.d.volkin@intel.com> <1391032710-19272-5-git-send-email-bradley.d.volkin@intel.com> <20140129221047.GK28110@nuc-i3427.alporthouse.com> <20140130114615.GF29091@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F5F06E268 for ; Tue, 25 Mar 2014 06:17:59 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id c13so445789eek.9 for ; Tue, 25 Mar 2014 06:17:59 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140130114615.GF29091@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , bradley.d.volkin@intel.com, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jan 30, 2014 at 11:46:15AM +0000, Chris Wilson wrote: > On Wed, Jan 29, 2014 at 10:10:47PM +0000, Chris Wilson wrote: > > On Wed, Jan 29, 2014 at 01:58:29PM -0800, bradley.d.volkin@intel.com wrote: > > > From: Brad Volkin > > > > > > Signed-off-by: Brad Volkin > > > --- > > > 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