[PATCH i-g-t 3/8] tests/intel/kms_pwrite_crc: Test cleanup
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Tue Jun 11 04:53:43 UTC 2024
Make sure the below points in IGT cleanup:
- Sanitize the state before starting the subtest.
- Clear the states before exiting the subtest.
- Update existing libdrm APIs with IGT kms APIs.
- Other misc (Ex: update deprecated APIs/macros/enums, FB leaks etc..)
V2:
- Drop igt_fixture form igt_simple_main
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/intel/kms_pwrite_crc.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tests/intel/kms_pwrite_crc.c b/tests/intel/kms_pwrite_crc.c
index 12add5da6..338c92c3a 100644
--- a/tests/intel/kms_pwrite_crc.c
+++ b/tests/intel/kms_pwrite_crc.c
@@ -125,7 +125,6 @@ static void prepare_crtc(data_t *data)
igt_output_t *output = data->output;
drmModeModeInfo *mode;
- igt_display_reset(display);
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
@@ -161,7 +160,7 @@ static void cleanup_crtc(data_t *data)
igt_plane_set_fb(data->primary, NULL);
- igt_output_set_pipe(output, PIPE_ANY);
+ igt_output_set_pipe(output, PIPE_NONE);
igt_display_commit(display);
igt_remove_fb(data->drm_fd, &data->fb[0]);
@@ -196,14 +195,14 @@ 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_display_require(&data.display, data.drm_fd);
+ igt_display_require_output(&data.display);
igt_require_pipe_crc(data.drm_fd);
- igt_display_require(&data.display, data.drm_fd);
+ data.devid = intel_get_drm_devid(data.drm_fd);
+ data.pipe_crc = NULL;
run_test(&data);
--
2.43.2
More information about the igt-dev
mailing list