Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Mohammed Thasleem <mohammed.thasleem@intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_lease: Terminate lease on bad connector id
Date: Thu, 8 Jun 2023 11:12:03 +0530	[thread overview]
Message-ID: <a75bf2d9-46b7-1963-fb10-4695094e478a@intel.com> (raw)
In-Reply-To: <20220430014347.94210-1-mohammed.thasleem@intel.com>

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@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);
>   

  parent reply	other threads:[~2023-06-08  5:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30  1:43 [igt-dev] [PATCH i-g-t] tests/kms_lease: Terminate lease on bad connector id Mohammed Thasleem
2023-05-31 12:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-01 20:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-08  5:42 ` Nautiyal, Ankit K [this message]
2023-06-08  5:51   ` [igt-dev] [PATCH i-g-t] " Nautiyal, Ankit K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a75bf2d9-46b7-1963-fb10-4695094e478a@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mohammed.thasleem@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox