[igt-dev] [PATCH i-g-t v2 3/5] tests/i915/kms_pwrite_crc: test cleanup
Kunal Joshi
kunal1.joshi at intel.com
Wed Sep 28 06:39:10 UTC 2022
v1:
Sanitize the state before starting the subtest and close drm_fd.
v2:
igt_fixture cannot be place inside igt_simple_main (Jeevan)
Corrected commit subject. (Swati)
Removed comments (Swati)
CC: Jeevan B <jeevan.b at intel.com>
Cc: Swati Sharma <swati2.sharma at intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
tests/i915/kms_pwrite_crc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/i915/kms_pwrite_crc.c b/tests/i915/kms_pwrite_crc.c
index 584e6a19..9bfd44ed 100644
--- a/tests/i915/kms_pwrite_crc.c
+++ b/tests/i915/kms_pwrite_crc.c
@@ -160,6 +160,9 @@ static void run_test(data_t *data)
enum pipe pipe;
for_each_pipe_with_valid_output(display, pipe, output) {
+
+ igt_display_reset(&data->display);
+
data->output = output;
data->pipe = pipe;
@@ -179,16 +182,13 @@ static data_t data;
igt_simple_main
{
data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
-
data.devid = intel_get_drm_devid(data.drm_fd);
-
kmstest_set_vt_graphics_mode();
-
igt_require_pipe_crc(data.drm_fd);
-
igt_display_require(&data.display, data.drm_fd);
run_test(&data);
-
+
igt_display_fini(&data.display);
+ close(data.drm_fd);
}
--
2.25.1
More information about the igt-dev
mailing list