From patchwork Fri May 20 17:02:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Vlad X-Patchwork-Id: 9129917 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 639C460467 for ; Fri, 20 May 2016 16:59:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 542D027B90 for ; Fri, 20 May 2016 16:59:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48B5E27CAF; Fri, 20 May 2016 16:59:24 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3070127B90 for ; Fri, 20 May 2016 16:59:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0FEE6EB15; Fri, 20 May 2016 16:59:21 +0000 (UTC) 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 6CC9F6EB10 for ; Fri, 20 May 2016 16:59:20 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 20 May 2016 09:59:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,340,1459839600"; d="scan'208";a="706372231" Received: from mcvlad-wk.rb.intel.com ([10.237.105.57]) by FMSMGA003.fm.intel.com with ESMTP; 20 May 2016 09:59:19 -0700 From: Marius Vlad To: intel-gfx@lists.freedesktop.org Date: Fri, 20 May 2016 20:02:16 +0300 Message-Id: <1463763736-27880-1-git-send-email-marius.c.vlad@intel.com> X-Mailer: git-send-email 2.8.0.rc3 Subject: [Intel-gfx] [PATCH i-g-t] tests/gem_exec_gttfill: Fix require memory assertion and tune down the timeout test for BAT. 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 There's no need to multiply the number of batches with the number of engines as intel_require_memory() already compares against the aperture size (count * BATCH_SIZE). This also removes the weird assertion messages where we need bogus amounts of RAM. Also tune down the timeout from from 10s to 2s to speed up BAT. CC: Chris Wilson Signed-off-by: Marius Vlad --- tests/gem_exec_gttfill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gem_exec_gttfill.c b/tests/gem_exec_gttfill.c index 5921923..4778e4d 100644 --- a/tests/gem_exec_gttfill.c +++ b/tests/gem_exec_gttfill.c @@ -144,7 +144,7 @@ static void fillgtt(int fd, unsigned ring, int timeout) count = size / BATCH_SIZE + 1; igt_debug("Using %'d batches to fill %'llu aperture on %d engines\n", count, (long long)size, nengine); - intel_require_memory(count * nengine, BATCH_SIZE, CHECK_RAM); + intel_require_memory(count, BATCH_SIZE, CHECK_RAM); memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffer_count = 1; @@ -195,7 +195,7 @@ igt_main igt_fork_hang_detector(device); igt_subtest("basic") - fillgtt(device, 0, 10); + fillgtt(device, 0, 2); for (e = intel_execution_engines; e->name; e++) igt_subtest_f("%s", e->name)