From patchwork Wed Oct 29 15:20:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 5188891 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1819C11AC for ; Wed, 29 Oct 2014 15:20:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BA7920225 for ; Wed, 29 Oct 2014 15:20:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3B27620172 for ; Wed, 29 Oct 2014 15:20:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B7DE56E59A; Wed, 29 Oct 2014 08:20:54 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by gabe.freedesktop.org (Postfix) with ESMTP id F07536E593 for ; Wed, 29 Oct 2014 08:20:52 -0700 (PDT) Received: by mail-wg0-f42.google.com with SMTP id k14so3566000wgh.1 for ; Wed, 29 Oct 2014 08:20:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=mqeEQYnEMIUOwSkFA24iFln8RZpcNEaO0w/CzjUNMbw=; b=EUgn5orLRiNxAJ7Q1jlT4dPjpGF1kmfZxrlnpCUzTPyhy20/JlTX7cSMNYnluu7SZB /ghpOHpze0z0fh2vohQVlZaRGBzdhCrqrAWBMdHcH1rF5UKLvQevwdcicEIk9S29Vn31 9Y3QVMd5vFKrQ7VNXCF14qPbkpsWg+clWZMAnPXuRXMo5cG2mPcxENRVTdnT4r5nHgvf CkKVe3rg9gTKKZ8P30LLsHIIXcOyqtXTpL1PwYSuKMcL6KDC4B4wgtSJwuoaxOeFCIxN EAUSVTtOl0+bjzFqMpDgFSZo/dUOAoKMMvVMEfK/BuitQ8TfG2aCMCt0ve8+LHnMNnxM Oitg== X-Gm-Message-State: ALoCoQlAeuc1TvX2Tm4NmcJNAxhjAqU/W5KcMCR58/uvi8M7uDNkz/e2Ql9MyCxnGyu9LN8qBgtt X-Received: by 10.194.23.104 with SMTP id l8mr13041764wjf.26.1414596051386; Wed, 29 Oct 2014 08:20:51 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id au3sm5521301wjc.15.2014.10.29.08.20.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Oct 2014 08:20:50 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Wed, 29 Oct 2014 15:20:47 +0000 Message-Id: <1414596047-19397-2-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414596047-19397-1-git-send-email-thomas.wood@intel.com> References: <1414596047-19397-1-git-send-email-thomas.wood@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] lib/igt_core.h: add debug messages for test requirements X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Thomas Wood --- lib/igt_core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/igt_core.h b/lib/igt_core.h index 5318c5e..f7a92ce 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -199,7 +199,7 @@ void __igt_skip_check(const char *file, const int line, const char *func, const char *check, const char *format, ...) __attribute__((noreturn)); #define igt_skip_check(E, F...) \ - __igt_skip_check(__FILE__, __LINE__, __func__, E, F); + __igt_skip_check(__FILE__, __LINE__, __func__, E, F) void igt_success(void); void igt_fail(int exitcode) __attribute__((noreturn)); @@ -348,6 +348,7 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_require(expr) do { \ if (!(expr)) igt_skip_check(#expr , NULL); \ + else igt_debug("Test requirement passed: "#expr"\n"); \ } while (0) /** @@ -362,6 +363,7 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_skip_on(expr) do { \ if ((expr)) igt_skip_check("!(" #expr ")" , NULL); \ + else igt_debug("Test requirement passed: !("#expr")\n"); \ } while (0) /** @@ -380,6 +382,7 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_require_f(expr, f...) do { \ if (!(expr)) igt_skip_check(#expr , f); \ + else igt_debug("Test requirement passed: "#expr"\n"); \ } while (0) /** @@ -398,6 +401,7 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_skip_on_f(expr, f...) do { \ if ((expr)) igt_skip_check("!("#expr")", f); \ + else igt_debug("Test requirement passed: !("#expr")\n"); \ } while (0) /* fork support code */