Re: [PATCH v2] igt/gem_workarounds: rework igt to test workaround registers

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

 



On Tue, Sep 02, 2014 at 12:12:28PM +0100, Chris Wilson wrote:
> On Tue, Sep 02, 2014 at 01:04:34PM +0200, Daniel Vetter wrote:
> > On Tue, Sep 02, 2014 at 10:59:06AM +0100, Damien Lespiau wrote:
> > > On Tue, Sep 02, 2014 at 10:18:20AM +0100, Arun Siluvery wrote:
> > > > -		igt_assert(fd >= 0);
> > > > +		if (fd < 0)
> > > > +			igt_skip_on("No Workaround table available !!\n");
> > > 
> > > That's not quite a correct use of the API. The _on is there to signal
> > > the first argument is an expression. This will work only because the
> > > string is evaluated to true. You probably want to use igt_skip_on_f()
> > > 
> > > http://people.freedesktop.org/~danvet/igt/intel-gpu-tools-i-g-t-core.html#igt-skip-on-f
> > 
> > Or just igt_skip_on - we dump the expression that was tested, which should
> > be fairly informational. At least when fd would have a better name ;-)
> 
> Use igt_require(), it produces more natural phrasing in usage and
> output.

Yeah, for new code I second this - we have too many macros ;-) But my
practice has been to use igt_skip_on when changing existing code since I
seem to be too incompetent to reliably invert boolean conditions ...

Cheers, 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