Re: [PATCH] igt: Test tiled bo for proper fence.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 18, 2014 at 02:43:45PM -0800, Bob Paauwe wrote:
> On Thu, 18 Dec 2014 21:31:43 +0100
> Daniel Vetter <daniel@xxxxxxxx> wrote:
> 
> > On Thu, Dec 18, 2014 at 09:50:27AM -0800, Bob Paauwe wrote:
> > > +
> > > +	/* Set the tiled buffer to all 0xff's */
> > > +	memset(bo_tiled->virtual, 0xff, bo_tiled->size);
> > > +	memset(bo_tiled->virtual, 0xdd, pitch * height);
> > > +
> > > +	/* Verify linear buffer is still all 0's by looking for a 0xff */
> > > +	if (memchr(bo_linear->virtual, 0xff, bo_linear->size) != NULL)
> > > +		failed = 1;
> > 
> > Imo just igt_assert here and reduce all the control flow.
> 
> So it's ok to skip all the unref / unmap when the test fails?

Totally. The kernel will clean up the mess for you, and being able to do
that is why we run each test as its own binary. It also helps a lot in
streamlining the testlogic by removing and control-flow which isn't part
of the test itself.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux