From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3709C433F5 for ; Wed, 3 Nov 2021 13:50:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55F2960C51 for ; Wed, 3 Nov 2021 13:50:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 55F2960C51 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D52916EA1E; Wed, 3 Nov 2021 13:50:41 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F22A6EA1E; Wed, 3 Nov 2021 13:50:41 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="211549650" X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="211549650" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 06:50:40 -0700 X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="489570101" Received: from murphyjo-mobl1.ger.corp.intel.com (HELO [10.213.220.152]) ([10.213.220.152]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 06:50:39 -0700 To: John.C.Harrison@Intel.com, IGT-Dev@Lists.FreeDesktop.Org References: <20211021234044.3071069-1-John.C.Harrison@Intel.com> <20211021234044.3071069-2-John.C.Harrison@Intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <426daa00-746e-31d5-d90b-9cf161738b9d@linux.intel.com> Date: Wed, 3 Nov 2021 13:50:37 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211021234044.3071069-2-John.C.Harrison@Intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH i-g-t 1/8] tests/i915/gem_exec_capture: Remove pointless assert X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 22/10/2021 00:40, John.C.Harrison@Intel.com wrote: > From: John Harrison > > The 'many' test ended with an 'assert(count)', presumably meaning to > ensure that some objects were actually captured. However, 'count' is > the number of objects created not how many were captured. Plus, there > is already a 'require(count > 1)' at the start and count is invarient > so the final assert is basically pointless. > > General concensus appears to be that the test should not fail > irrespective of how many blobs are captured as low memory situations > could cause the capture to be abbreviated. So just remove the > pointless assert completely. Hm the test appears to be using intel_get_avail_ram_mb() to size the working set. Suggesting problems with low memory situations should not apply unless bugs. In which case would a better fix be improving the sizing logic and changing the assert to igt_assert(blobs)? Regards, Tvrtko > Signed-off-by: John Harrison > --- > tests/i915/gem_exec_capture.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c > index 7e0a8b8ad..53649cdb2 100644 > --- a/tests/i915/gem_exec_capture.c > +++ b/tests/i915/gem_exec_capture.c > @@ -524,7 +524,6 @@ static void many(int fd, int dir, uint64_t size, unsigned int flags) > } > igt_info("Captured %lu %"PRId64"-blobs out of a total of %lu\n", > blobs, size >> 12, count); > - igt_assert(count); > > free(error); > free(offsets); >