diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-12 13:32:17 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-12 13:43:00 +0100 |
| commit | 2e526ae9cd05f4f2c2e166071b78c68564e191aa (patch) | |
| tree | 738721f6af8af2b76f7064659749bd0ca23e33e3 | |
| parent | 007ff02cbcf008628476948cad8e9ea08c6f5f26 (diff) | |
igt/gem_flink_race: Explicitly quiesce the GPU before counting objects
By explicitly quiescing the GPU we force it to a known and ideally
identical state when counting objects. In particular, this should make
the batch-pool status the same and not cause us to detect a negative
leak.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
| -rw-r--r-- | tests/gem_flink_race.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gem_flink_race.c b/tests/gem_flink_race.c index 6ef15f36..889cb1be 100644 --- a/tests/gem_flink_race.c +++ b/tests/gem_flink_race.c @@ -56,12 +56,13 @@ static int get_object_count(void) FILE *file; int scanned, ret; - igt_drop_caches_set(DROP_RETIRE); + igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE); file = igt_debugfs_fopen("i915_gem_objects", "r"); scanned = fscanf(file, "%i objects", &ret); igt_assert_eq(scanned, 1); + igt_debug("Reports %d objects\n", ret); return ret; } @@ -165,6 +166,7 @@ static void test_flink_close(void) * up the counts */ fake = drm_open_any(); + gem_quiescent_gpu(fake); obj_count = get_object_count(); num_threads = sysconf(_SC_NPROCESSORS_ONLN); @@ -190,6 +192,7 @@ static void test_flink_close(void) close(fd); + gem_quiescent_gpu(fake); obj_count = get_object_count() - obj_count; igt_info("leaked %i objects\n", obj_count); |
