From patchwork Tue Mar 24 18:30:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jeff.mcgee@intel.com X-Patchwork-Id: 6084921 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0570D9F2A9 for ; Tue, 24 Mar 2015 18:31:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2431E201EF for ; Tue, 24 Mar 2015 18:31:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 40066201ED for ; Tue, 24 Mar 2015 18:31:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 905C36E400; Tue, 24 Mar 2015 11:31:05 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 836F16E400 for ; Tue, 24 Mar 2015 11:31:04 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 24 Mar 2015 11:31:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,459,1422950400"; d="scan'208";a="703532068" Received: from jeffdesk.fm.intel.com ([10.19.123.159]) by orsmga002.jf.intel.com with ESMTP; 24 Mar 2015 11:31:04 -0700 From: jeff.mcgee@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 24 Mar 2015 11:30:57 -0700 Message-Id: <1427221857-26716-1-git-send-email-jeff.mcgee@intel.com> X-Mailer: git-send-email 2.3.3 Subject: [Intel-gfx] [PATCH i-g-t] tests/drv_getparams: Skip instead of fail on EINVAL 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Jeff McGee Avoid failing on older kernels where the GETPARAM interfaces don't exist. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89669 Signed-off-by: Jeff McGee --- tests/drv_getparams.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/drv_getparams.c b/tests/drv_getparams.c index f383662..1861fb8 100644 --- a/tests/drv_getparams.c +++ b/tests/drv_getparams.c @@ -77,6 +77,7 @@ subslice_total(void) int ret; ret = getparam(LOCAL_I915_PARAM_SUBSLICE_TOTAL, (int*)&subslice_total); + igt_skip_on_f(ret == -EINVAL, "Interface not supported by kernel\n"); if (ret) { /* @@ -93,9 +94,7 @@ subslice_total(void) * fail them if we are here. */ } else { - igt_assert_neq(ret, EINVAL); /* request not recognized? */ - igt_assert_neq(ret, ENODEV); /* device not supported? */ - igt_assert_eq(ret, 0); /* other error? */ + igt_assert_eq(ret, 0); } } else { /* @@ -115,6 +114,7 @@ eu_total(void) int ret; ret = getparam(LOCAL_I915_PARAM_EU_TOTAL, (int*)&eu_total); + igt_skip_on_f(ret == -EINVAL, "Interface not supported by kernel\n"); if (ret) { /* @@ -131,9 +131,7 @@ eu_total(void) * fail them if we are here. */ } else { - igt_assert_neq(ret, EINVAL); /* request not recognized? */ - igt_assert_neq(ret, ENODEV); /* device not supported? */ - igt_assert_eq(ret, 0); /* other error? */ + igt_assert_eq(ret, 0); } } else { /*