[igt-dev] [PATCH v3 2/2] tests/i915/kms_mmap_write_crc: Test Cleanup
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Jul 7 04:36:01 UTC 2022
On Tue-28-06-2022 07:05 pm, Mohammed Thasleem wrote:
> Sanitize the system state before starting the subtest.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
> ---
> tests/i915/kms_mmap_write_crc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
> index 50aa434d..3309f359 100644
> --- a/tests/i915/kms_mmap_write_crc.c
> +++ b/tests/i915/kms_mmap_write_crc.c
> @@ -169,6 +169,8 @@ static void prepare_crtc(data_t *data)
> igt_output_t *output = data->output;
> drmModeModeInfo *mode;
Can we re-use this mode in test() too?
>
> + igt_display_reset(display);
> +
> /* select the pipe we want to use */
> igt_output_set_pipe(output, data->pipe);
>
> @@ -204,7 +206,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]);
> @@ -292,6 +294,7 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL)
>
Please add igt_display_require_output() to igt_fixture.
Also, from patch 1/2, we are running this test 10 times.
for_loop(10) {
prepare();
test();
cleanup();
}
Do we really need to use prepare() & cleanup() everytime, since we are
using same pipe/output combination?
- Bhanu
> igt_fixture {
> igt_display_fini(&data.display);
> + close(data.drm_fd);
>
> igt_stop_helper(&hog);
> }
More information about the igt-dev
mailing list