[igt-dev] [PATCH v3 2/2] tests/kms_lease: Test Cleanup
Mohammed Thasleem
mohammed.thasleem at intel.com
Mon Aug 1 11:07:10 UTC 2022
Sanitize the system state before starting the subtest.
v2: Minor changes.
Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
tests/kms_lease.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 6126ded9..1d4ff904 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -136,7 +136,7 @@ static void cleanup_crtc(lease_t *lease, igt_output_t *output)
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
- igt_output_set_pipe(output, PIPE_ANY);
+ igt_output_set_pipe(output, PIPE_NONE);
igt_display_commit(display);
}
@@ -1235,12 +1235,15 @@ igt_main
data.master.fd = drm_open_driver_master(DRIVER_ANY);
kmstest_set_vt_graphics_mode();
igt_display_require(&data.master.display, data.master.fd);
+ igt_display_require_output(&data.master.display);
}
for (f = funcs; f->name; f++) {
igt_describe(f->desc);
igt_subtest_with_dynamic_f("%s", f->name) {
+ igt_display_reset(&data.master.display);
+ igt_display_commit(&data.master.display);
for_each_pipe_with_valid_output(&data.master.display, p, output) {
igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p),
igt_output_name(output)) {
@@ -1277,4 +1280,9 @@ igt_main
igt_describe("Tests all the uevent cases");
igt_subtest("lease-uevent")
lease_uevent(&data);
+
+ igt_fixture {
+ igt_display_fini(&data.master.display);
+ close(data.master.fd);
+ }
}
--
2.25.1
More information about the igt-dev
mailing list