[igt-dev] [PATCH i-g-t 1/1] tests/gem_lmem_swapping: retry execbuf on no memory error with oom testing
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Nov 14 16:45:59 UTC 2022
From: CQ Tang <cq.tang at intel.com>
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 <cq.tang at intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
Cc: Arjun Melkaveri <arjun.melkaveri at intel.com>
Cc: Ursulin Tvrtko <tvrtko.ursulin at intel.com>
---
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
More information about the igt-dev
mailing list