[igt-dev] [PATCH v2 2/2] tests/i915/kms_legacy_colorkey: Test Cleanup

Mohammed Thasleem mohammed.thasleem at intel.com
Mon Jun 27 16:41:56 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 92be2567..71b1bbb9 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