[igt-dev] [PATCH i-g-t] tests/kms_lease: Terminate lease on bad connector id

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Thu Jun 8 05:42:03 UTC 2023


Hi Thasleem,

I think we should have terminate lease in igt_fixture where we have 
igt_display_fini and all.

There are many places where lease->fd remains open, during different 
asserts, skip_ons throughout the test.

Regards,

Ankit

On 4/30/2022 7:13 AM, Mohammed Thasleem wrote:
> igt_skip_on make resource busy for sub sequence tests.
> To avoid this terminate the lease on bad connector id.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
> ---
>   tests/kms_lease.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 29a774ae8..03538cf8c 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -682,6 +682,10 @@ static void lease_unleased_connector(data_t *data)
>   			bad_connector_id = data->master.display.outputs[o].id;
>   	}
>   
> +	/* Terminate lease on bad connector id before skip. */
> +	if (bad_connector_id == 0)
> +		terminate_lease(&lease);

Perhaps we can add igt_skip("Couldnt find another connector"); in the if 
block only.

This scenario can happen in another subtest as well

> +
>   	/* Give up if there isn't another connector */
>   	igt_skip_on(bad_connector_id == 0);
>   


More information about the igt-dev mailing list