From: Daniel Vetter Subject: Re: [PATCH 0/7] drmtest framework support for retval handling Date: Mon, 12 Aug 2013 11:30:05 +0200 Message-ID: <20130812093005.GT31670@phenom.ffwll.local> References: <1376298601-18641-1-git-send-email-daniel.vetter@ffwll.ch> <20130812091553.GR31670@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) by gabe.freedesktop.org (Postfix) with ESMTP id C904CE5EED for ; Mon, 12 Aug 2013 02:29:58 -0700 (PDT) Received: by mail-ea0-f174.google.com with SMTP id z15so3251155ead.19 for ; Mon, 12 Aug 2013 02:29:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130812091553.GR31670@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: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Mon, Aug 12, 2013 at 11:15:53AM +0200, Daniel Vetter wrote: > On Mon, Aug 12, 2013 at 11:09:54AM +0200, Daniel Vetter wrote: > > Hi all, > > > > So I've grown fed-up with our add-hoc (and pretty much always buggy) return > > value tracking for testcases with subtests. Furthermore sprinkling testcases > > with tons of if (kernel_has_some_optional_feature) return 77; isn't really > > helping test case readability. > > > > So I've gone ahead and implement some magic stuff using setjmp/longjmp and a few > > macros. On top of that a few exemplary conversions of existing testcases. > > > > Comments highly welcome. > > > > Cheers, Daniel > > Just noticed that this already doesn't apply, so I've pushed a rebased > version to > > http://cgit.freedesktop.org/~danvet/intel-gpu-tools/log/?h=retval-infrastructure > > That one also contains one hunk I've failed to git add. One more thing I've forgotten to mention is that I want to add a drmtest_assert macro on top of this which would replace allmost all usage of assert in lib/drmtest and tests/*. With a few useful printks sprinkled over drmtest_run_subtest and the drmtest_(skip|success|fail) functions we could dump per-subtest results even when running with the legacy igt automake testrunner. And with that we could also make sure that we run all subtests and don't just fall over after the first one completed. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch