From patchwork Wed Mar 2 13:11:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Weinehall X-Patchwork-Id: 8480611 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 60969C0553 for ; Wed, 2 Mar 2016 13:13:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0ABE20373 for ; Wed, 2 Mar 2016 13:13:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ACF5B20221 for ; Wed, 2 Mar 2016 13:13:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E90D36E859; Wed, 2 Mar 2016 13:13:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 807D96E857 for ; Wed, 2 Mar 2016 13:13:28 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 02 Mar 2016 05:12:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,528,1449561600"; d="scan'208";a="662493143" Received: from dweineha-mobl3.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 02 Mar 2016 05:12:43 -0800 From: David Weinehall To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Mar 2016 15:11:57 +0200 Message-Id: <1456924317-23525-1-git-send-email-david.weinehall@linux.intel.com> X-Mailer: git-send-email 2.7.0 Subject: [Intel-gfx] [PATCH i-g-t] tests/pm_rpm: Fix CRASH on machines that lack LLC 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, 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 On machines that lack an LLC the pm-caching subtest will terminate with sigbus and thus CRASH during the I915_CACHING_CACHED iteration. This patch adds a check for this condition and skips that iteration. Signed-off-by: David Weinehall --- tests/pm_rpm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 2aa6c1018aa2..c25252eafad0 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -1813,6 +1813,16 @@ static void pm_test_caching(void) gem_buf = gem_mmap__gtt(drm_fd, handle, gtt_obj_max_size, PROT_WRITE); for (i = 0; i < ARRAY_SIZE(cache_levels); i++) { + /* + * Skip the I915_CACHING_CACHED test + * if we lack an LLC cache + */ + if (cache_levels[i] == I915_CACHING_CACHED && + !gem_has_llc(drm_fd)) { + igt_debug("!gem_has_llc(); skipping\n"); + continue; + } + memset(gem_buf, 16 << i, gtt_obj_max_size); disable_all_screens_and_wait(&ms_data);