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

Antonio Argenziano antonio.argenziano at intel.com
Wed Apr 11 21:45:31 UTC 2018


Make sure all outstanding work has completed before exiting the test.

Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
---
 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