From patchwork Thu Sep 7 06:49:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abdiel Janulgue X-Patchwork-Id: 9941647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3DD3F6035F for ; Thu, 7 Sep 2017 06:50:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3196C28520 for ; Thu, 7 Sep 2017 06:50:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 267FB2852C; Thu, 7 Sep 2017 06:50:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 33A6628520 for ; Thu, 7 Sep 2017 06:50:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A50A6E850; Thu, 7 Sep 2017 06:50:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0EE426E850 for ; Thu, 7 Sep 2017 06:50:38 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2017 23:50:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,357,1500966000"; d="scan'208";a="308938914" Received: from abdiel-macbookpro.fi.intel.com ([10.237.66.47]) by fmsmga004.fm.intel.com with ESMTP; 06 Sep 2017 23:49:47 -0700 From: Abdiel Janulgue To: intel-gfx@lists.freedesktop.org Date: Thu, 7 Sep 2017 09:49:42 +0300 Message-Id: <20170907064942.4084-1-abdiel.janulgue@linux.intel.com> X-Mailer: git-send-email 2.9.3 Subject: [Intel-gfx] [PATCH i-g-t] tests/tools_test: Make sure l3_parity is supported 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-Virus-Scanned: ClamAV using ClamSMTP Check support before executing test. v2: Skip test only if intel_l3_parity tool tells us to skip. (Petri) bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101650 Cc: Petri Latvala Signed-off-by: Abdiel Janulgue --- tests/tools_test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/tools_test.c b/tests/tools_test.c index ccd165d..ebd4a9d 100644 --- a/tests/tools_test.c +++ b/tests/tools_test.c @@ -89,7 +89,8 @@ igt_main igt_system_cmd(exec_return, "../tools/intel_l3_parity -r 0 -b 0 " "-s 0 -e"); - igt_assert(exec_return == IGT_EXIT_SUCCESS); + igt_skip_on_f(exec_return == IGT_EXIT_SKIP, + "intel_l3_parity not supported\n"); igt_system_cmd(exec_return, "../tools/intel_l3_parity -l | " @@ -101,13 +102,14 @@ igt_main &val); igt_assert(val == 1); } else { - igt_fail(IGT_EXIT_FAILURE); + igt_skip("intel_l3_parity not supported\n"); } igt_system_cmd(exec_return, "../tools/intel_l3_parity -r 0 -b 0 " "-s 0 -e"); - igt_assert(exec_return == IGT_EXIT_SUCCESS); + igt_skip_on_f(exec_return == IGT_EXIT_SKIP, + "intel_l3_parity not supported\n"); /* Check that we can clear remaps */ igt_system_cmd(exec_return, @@ -119,7 +121,7 @@ igt_main &val); igt_assert(val == 1); } else { - igt_fail(IGT_EXIT_FAILURE); + igt_skip("intel_l3_parity not supported\n"); } }