From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id D0E9610E668 for ; Thu, 17 Nov 2022 18:29:09 +0000 (UTC) Date: Thu, 17 Nov 2022 19:29:05 +0100 From: Kamil Konieczny To: igt-dev@lists.freedesktop.org Message-ID: References: <20221114164559.30419-1-zbigniew.kempczynski@intel.com> <20221114164559.30419-2-zbigniew.kempczynski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221114164559.30419-2-zbigniew.kempczynski@intel.com> Subject: Re: [igt-dev] [PATCH i-g-t 1/1] tests/gem_lmem_swapping: retry execbuf on no memory error with oom testing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CQ Tang , Arjun Melkaveri , Ursulin Tvrtko Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On 2022-11-14 at 17:45:59 +0100, Zbigniew Kempczyński wrote: > From: CQ Tang > > When doing oom test, we have side processes to eat all the system memory, > so the swapping test process might encounter -ENOMEM or -ENXIO error as > well, we need to retry the operation when these errors are returned. > > Signed-off-by: CQ Tang > Signed-off-by: Zbigniew Kempczyński > Cc: Ashutosh Dixit > Cc: Arjun Melkaveri > Cc: Ursulin Tvrtko Reviewed-by: Kamil Konieczny > --- > tests/i915/gem_lmem_swapping.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c > index cccdb3195b..969fb9080b 100644 > --- a/tests/i915/gem_lmem_swapping.c > +++ b/tests/i915/gem_lmem_swapping.c > @@ -133,7 +133,7 @@ static uint32_t create_bo(int i915, > > retry: > ret = __gem_create_in_memory_region_list(i915, &handle, size, 0, region, 1); > - if (do_oom_test && ret == -ENOMEM) > + if (do_oom_test && (ret == -ENOMEM || ret == -ENXIO)) > goto retry; > igt_assert_eq(ret, 0); > return handle; > -- > 2.34.1 >