summaryrefslogtreecommitdiff
path: root/tests/i915/gem_lmem_swapping.c
diff options
context:
space:
mode:
authorArjun Melkaveri <arjun.melkaveri@intel.com>2022-04-01 12:58:26 +0530
committerAshutosh Dixit <ashutosh.dixit@intel.com>2022-04-01 10:48:55 -0700
commitf3110b3083b4fecfa2153563990720a7b82485c1 (patch)
treef406286388e6e7ff230c104f33a3b970fc1124d5 /tests/i915/gem_lmem_swapping.c
parent50f7bc405cc1411f57855ed23322c6c4d2510b58 (diff)
tests/i915/gem_lmem_swapping: Fix bug in test_smem_oom
ctx was not initialized with all physical engines, after device reopening. This change would resolve assert issue seen in __do_evict. v2: Added missing intel_ctx_destroy. Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/i915/gem_lmem_swapping.c')
-rw-r--r--tests/i915/gem_lmem_swapping.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 43f0688f..432607b0 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -428,10 +428,14 @@ static void test_smem_oom(int i915,
fill_params(i915, &params, region, 0, 1, true);
+ ctx = intel_ctx_create_all_physical(fd);
+ __gem_context_set_persistence(fd, ctx->id, false);
+
igt_install_exit_handler(smem_oom_exit_handler);
__do_evict(fd, ctx, &region->region, &params,
params.seed + child + 1);
+ intel_ctx_destroy(fd, ctx);
close(fd);
}