[Intel-gfx] [PATCH 2/7] lib/drmtest: Add drmtest_subtest_block macro

Daniel Vetter daniel at ffwll.ch
Mon Aug 12 12:20:24 CEST 2013


On Mon, Aug 12, 2013 at 11:26:49AM +0200, Daniel Vetter wrote:
> On Mon, Aug 12, 2013 at 10:15:06AM +0100, Chris Wilson wrote:
> > On Mon, Aug 12, 2013 at 11:09:56AM +0200, Daniel Vetter wrote:
> > > Doesn't do more than an if (drmtest_run_test(name)) right now, but
> > > as soon as we get a bit of infrastructure to handle test failures and
> > > skipping, this will get more interesting.
> > 
> > Just use drm_subtest("name") { }
> > 
> > drm_subtest_block() reads like a function and so one expects "block" to
> > be a verb.
> 
> The intention was to make clear that the macro expects a C code block
> afterwards. See the later patches for some of the fun I add ... I see that
> the _block suffix can be misread, but tbh I don't have any other ideas
> that might properly convey what this thing is. The 2nd best I could think
> of is do_subtest("name") similar to do {} while (). But that's not great
> either.

Ok, I've applied the following three bikesheds onto my tree:
- s/drmtest_run_subtest/__drmtest_run_subtest/ since that fuction is now
  internal to drmtest.c (but needs to be in the header due to the fancy
  macro).
- s/drmtest_subtest_block/drmtest/subtest/ ... see above.
- s/drmtest_/igt_/ just because (suggested by Chris on irc).

-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list