From: Daniel Vetter Subject: Re: [PATCH 2/7] lib/drmtest: Add drmtest_subtest_block macro Date: Mon, 12 Aug 2013 11:26:49 +0200 Message-ID: <20130812092649.GS31670@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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by gabe.freedesktop.org (Postfix) with ESMTP id A5771E6630 for ; Mon, 12 Aug 2013 02:26:42 -0700 (PDT) Received: by mail-ee0-f52.google.com with SMTP id c41so3380882eek.39 for ; Mon, 12 Aug 2013 02:26:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130812091506.GA21651@cantiga.alporthouse.com> 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 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. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch