[igt-dev] [PATCH i-g-t v2] tests/gem_close_race: Wait for work to complete before terminating test

Antonio Argenziano antonio.argenziano at intel.com
Wed Apr 11 22:32:09 UTC 2018


When running a single subtest, outstanding work might hang after the test
ends therefore escaping detection by the hang_detector.

v2:
	- Update commit message. (Chris)

Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/gem_close_race.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c
index bc1127b1..11d626dc 100644
--- a/tests/gem_close_race.c
+++ b/tests/gem_close_race.c
@@ -148,6 +148,8 @@ static void process(int child)
 	handle = load(fd);
 	if ((child & 63) == 63)
 		gem_read(fd, handle, 0, &handle, sizeof(handle));
+
+	gem_quiescent_gpu(fd);
 }
 
 struct crashme {
@@ -203,6 +205,8 @@ static void threads(int timeout)
 	}
 
 	timer_delete(timer);
+
+	gem_quiescent_gpu(fd);
 	close(fd);
 }
 
-- 
2.16.2



More information about the igt-dev mailing list