From patchwork Tue Aug 4 19:53:11 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: 6943731 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 727C7C05AC for ; Tue, 4 Aug 2015 19:54:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3B44205AA for ; Tue, 4 Aug 2015 19:54:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A31592053C for ; Tue, 4 Aug 2015 19:54:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 021A96E8D6; Tue, 4 Aug 2015 12:53:59 -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 219EA6E8D6 for ; Tue, 4 Aug 2015 12:53:57 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 04 Aug 2015 12:53:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,610,1432623600"; d="scan'208";a="619264905" Received: from hmmeyer-mobl2.amr.corp.intel.com (HELO panetone.amr.corp.intel.com) ([10.252.133.90]) by orsmga003.jf.intel.com with ESMTP; 04 Aug 2015 12:53:16 -0700 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 4 Aug 2015 16:53:11 -0300 Message-Id: <1438717991-4743-1-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.4.6 Subject: [Intel-gfx] [PATCH igt] tests/gem_mmap_wc: SKIP 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 If the Kernel is too old, getparam will return -EINVAL. Just SKIP on this case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739 Cc: Chris Wilson Signed-off-by: Paulo Zanoni --- tests/gem_mmap_wc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/gem_mmap_wc.c b/tests/gem_mmap_wc.c index 6e43465..f9d001a 100644 --- a/tests/gem_mmap_wc.c +++ b/tests/gem_mmap_wc.c @@ -93,6 +93,7 @@ test_invalid_flags(int fd) struct local_i915_gem_mmap_v2 arg; uint64_t flag = I915_MMAP_WC; int val = -1; + int rc; memset(&arg, 0, sizeof(arg)); arg.handle = gem_create(fd, 4096); @@ -104,7 +105,9 @@ test_invalid_flags(int fd) gp.value = &val; /* Do we have the new mmap_ioctl? */ - do_ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + igt_skip_on(rc == -1 && errno == EINVAL); + igt_assert(rc == 0); if (val >= 1) { /*