From patchwork Wed Sep 12 09:33:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10597205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D264920 for ; Wed, 12 Sep 2018 09:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECE3A21327 for ; Wed, 12 Sep 2018 09:33:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE4C3260CD; Wed, 12 Sep 2018 09:33:15 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F90821327 for ; Wed, 12 Sep 2018 09:33:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4B776E4CF; Wed, 12 Sep 2018 09:33:14 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD4E06E187 for ; Wed, 12 Sep 2018 09:33:12 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id t25-v6so1580199wmi.3 for ; Wed, 12 Sep 2018 02:33:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ejuz+lB15Lo2hDm66Dt6quiAeNIDF1KS1kWWo1/73Ww=; b=TvqMu1rIB3Nh0qmg9zRZy9qwvndJLBM3Qi1LxpNS2jOIfooKxPiqfUAkOYm4IhYMuk GW0HgKs0go9mDEzo0wlz41/7J8nKUEiK6BzKGlN5tmj6/yIfINNFXvbTZaE6Vm/GcKg9 Dy+7oT6FSnPXJ9TtkEqGQEt5pMtXWPI+W9o/qzWN2qD+9PJijtC8ZAh3khMDrGQGFO7k FySAGlya+MV3v4hvrb+NECz/4OQ+jNNM3HfB3E4KTjmpF4l/YBb1bh2Dhgrt+WWzMDBu tnt+Qnp666bjz7x0DSbqWQzGUW401XH/rI10SGS96z6D0gNB4mcjoTKLYSmlZCGJ5l5O V52A== X-Gm-Message-State: APzg51ADn4gxQ6cwp+K5byRnrCgrjWu4/RZwXwRHoxYDtdP04OBDdAd5 JLGbnAKLuUwMRJKNRss5iKa3AQ== X-Google-Smtp-Source: ANB0Vdbx2FfFiyq4cvn/Uh3shIrc/4gSO1gsCP1tBrILHL+Posa8mFYRE2srmccIMjfsKRVQZK7zmQ== X-Received: by 2002:a1c:8f0e:: with SMTP id r14-v6mr946255wmd.79.1536744791320; Wed, 12 Sep 2018 02:33:11 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.37]) by smtp.gmail.com with ESMTPSA id j6-v6sm355316wrq.25.2018.09.12.02.33.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 02:33:10 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Wed, 12 Sep 2018 10:33:05 +0100 Message-Id: <20180912093306.23537-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATH i-g-t 1/2] intel: Be consistent with test results on simulation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Tests which call intel_require_memory currently always skip on simulation, unless they fail first due insufficient memory. This can create different outcomes depending on the simulation environment so move the simulation skip to the start of the function for 100% consistency in results. Signed-off-by: Tvrtko Ursulin Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson --- lib/intel_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/intel_os.c b/lib/intel_os.c index 29a27272e782..e1e31e23069b 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -375,6 +375,8 @@ void intel_require_memory(uint64_t count, uint64_t size, unsigned mode) uint64_t required, total; bool sufficient_memory; + igt_skip_on_simulation(); + sufficient_memory = __intel_check_memory(count, size, mode, &required, &total); if (!sufficient_memory) { @@ -406,8 +408,6 @@ void intel_require_memory(uint64_t count, uint64_t size, unsigned mode) mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", mode & CHECK_SWAP ? " + swap": "", (long long)vfs_file_max()); - - igt_skip_on_simulation(); } void intel_purge_vm_caches(int drm_fd)