diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-19 06:46:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-23 10:59:50 +0100 |
commit | dcc44347494231feabc588c2a76998cbc9afdf8c (patch) | |
tree | df9f5b8998b5a443358ab42043ed9cdd6d8aaadc | |
parent | 8168bb65d5e64d4df4e5d847d448bab2d2825d73 (diff) |
igt/gem_ppgtt: Flush the driver to idle before counting leaks
I have a cunning plan to make the vma open/close lazy to cache frequent
reallocations (as buffers are passed between applications, e.g. DRI).
However, this will mean that we will not be immediately closing vma and
so need to tell the kernel to process the idle handlers before checking
for leaks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r-- | tests/gem_ppgtt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c index bed95db8..575b0e9d 100644 --- a/tests/gem_ppgtt.c +++ b/tests/gem_ppgtt.c @@ -236,7 +236,7 @@ static void flink_and_close(void) gem_sync(fd2, flinked_bo); gem_close(fd2, flinked_bo); - igt_drop_caches_set(fd, DROP_RETIRE); + igt_drop_caches_set(fd, DROP_RETIRE | DROP_IDLE); /* the flinked bo VMA should have been cleared now, so a new bo of the * same size should get the same offset @@ -286,7 +286,7 @@ static void flink_and_exit(void) exec_and_get_offset(fd3, gem_create(fd3, 4096)); close(fd3); - igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE); + igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE | DROP_IDLE); igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match)); close(fd); |