From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2] igt/gem_workarounds: rework igt to test workaround registers Date: Tue, 2 Sep 2014 13:04:34 +0200 Message-ID: <20140902110434.GZ15520@phenom.ffwll.local> References: <1409578187-2909-3-git-send-email-arun.siluvery@linux.intel.com> <1409649500-12327-1-git-send-email-arun.siluvery@linux.intel.com> <20140902095906.GJ1118@strange.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CF076E44C for ; Tue, 2 Sep 2014 04:04:10 -0700 (PDT) Received: by mail-wg0-f52.google.com with SMTP id m15so6645825wgh.23 for ; Tue, 02 Sep 2014 04:04:10 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140902095906.GJ1118@strange.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch