From patchwork Wed Aug 5 17:59:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zanoni, Paulo R" X-Patchwork-Id: 6952291 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 9B5629F38B for ; Wed, 5 Aug 2015 17:59:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CADE5203EB for ; Wed, 5 Aug 2015 17:59:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F1B1F203E5 for ; Wed, 5 Aug 2015 17:59:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 394C26E7D8; Wed, 5 Aug 2015 10:59:52 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id B4D846E7D8 for ; Wed, 5 Aug 2015 10:59:50 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 05 Aug 2015 10:59:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,618,1432623600"; d="scan'208";a="777515034" Received: from hmmeyer-mobl2.amr.corp.intel.com (HELO panetone.amr.corp.intel.com) ([10.252.133.90]) by fmsmga002.fm.intel.com with ESMTP; 05 Aug 2015 10:59:48 -0700 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 5 Aug 2015 14:59:28 -0300 Message-Id: <1438797568-9994-1-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <20150805083321.GB10387@nuc-i3427.alporthouse.com> References: <20150805083321.GB10387@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH igt] tests/gem_mmap_wc: don't fail if the Kernel is too old for the getparam flag 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.3 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 Just don't check the drmIoctl() return code: the "if (val)" should be enough to prevent any problems. v2: Don't SKIP, just proceed (Chris). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739 Cc: Chris Wilson Signed-off-by: Paulo Zanoni Reviewed-by: Chris Wilson --- tests/gem_mmap_wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gem_mmap_wc.c b/tests/gem_mmap_wc.c index 6e43465..0a5326e 100644 --- a/tests/gem_mmap_wc.c +++ b/tests/gem_mmap_wc.c @@ -104,7 +104,7 @@ test_invalid_flags(int fd) gp.value = &val; /* Do we have the new mmap_ioctl? */ - do_ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); if (val >= 1) { /*