[Intel-gfx] [PATCH i-g-t] tests/gem_exec_reuse: Adds cleanup at the end of test.

Antonio Argenziano antonio.argenziano at intel.com
Mon Aug 28 23:18:34 UTC 2017


This patch introduces a fixture at the end of the test to destroy
objects that have been created and stop the hang detector.

Cc: Chris Wilson <chris at chris-wilson.co.uk>

Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
---
 tests/gem_exec_reuse.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/gem_exec_reuse.c b/tests/gem_exec_reuse.c
index cdfa9783..db26e57c 100644
--- a/tests/gem_exec_reuse.c
+++ b/tests/gem_exec_reuse.c
@@ -234,4 +234,11 @@ igt_main
 		for (n = 0; n < ncontexts; n++)
 			gem_context_destroy(no.fd, contexts[n]);
 	}
+
+	igt_fixture {
+		igt_stop_hang_detector();
+
+		gem_close(no.fd, no.batch);
+		close(no.fd);
+	}
 }
-- 
2.14.1



More information about the Intel-gfx mailing list