[igt-dev] [PATCH i-g-t 2/2] tests/i915/kms_legacy_colorkey: Test Cleanup

Mohammed Thasleem mohammed.thasleem at intel.com
Thu Jun 16 10:02:08 UTC 2022


Sanitize the system state before starting the subtest.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
 tests/i915/kms_legacy_colorkey.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/i915/kms_legacy_colorkey.c b/tests/i915/kms_legacy_colorkey.c
index 3f596eb6..0b4d7e90 100644
--- a/tests/i915/kms_legacy_colorkey.c
+++ b/tests/i915/kms_legacy_colorkey.c
@@ -51,6 +51,9 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 
 		igt_display_require(&display, drm_fd);
+		igt_display_require_output(&display);
+		igt_display_reset(&display);
+		igt_display_commit(&display);
 		for_each_pipe(&display, p) {
 			for_each_plane_on_pipe(&display, p, plane) {
 				max_id = max(max_id, plane->drm_plane->plane_id);
@@ -86,5 +89,6 @@ igt_main
 
 	igt_fixture {
 		igt_display_fini(&display);
+		close(drm_fd);
 	}
 }
-- 
2.25.1



More information about the igt-dev mailing list