From: Daniel Vetter Subject: Re: [PATCH 2/7] lib/drmtest: Add drmtest_subtest_block macro Date: Mon, 12 Aug 2013 12:20:24 +0200 Message-ID: <20130812102024.GU31670@phenom.ffwll.local> References: <1376298601-18641-1-git-send-email-daniel.vetter@ffwll.ch> <1376298601-18641-3-git-send-email-daniel.vetter@ffwll.ch> <20130812091506.GA21651@cantiga.alporthouse.com> <20130812092649.GS31670@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 53FF5E5D38 for ; Mon, 12 Aug 2013 03:20:17 -0700 (PDT) Received: by mail-ea0-f176.google.com with SMTP id q16so3328821ead.35 for ; Mon, 12 Aug 2013 03:20:16 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130812092649.GS31670@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org 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