public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@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: close mcl.fd when drmModeSetCrtc fails
Date: Thu, 19 Jan 2023 12:04:43 +0530	[thread overview]
Message-ID: <ef066db6-395e-5c68-9a15-bd2089ea825c@intel.com> (raw)
In-Reply-To: <20230118073339.141643-1-mohammed.thasleem@intel.com>


On 1/18/2023 1:03 PM, Mohammed Thasleem wrote:
> Close mcl.fd when drmModeSetCrtc retuns fail and it will
> unblock the resources so that test continue execution on
> another panels.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> ---
>   tests/kms_lease.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 67e8d3be..c870bfd1 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -317,6 +317,7 @@ static void setcrtc_implicit_plane(data_t *data)
>   	struct drm_mode_create_lease mcl;
>   	drmModePlaneRes *plane_resources;
>   	uint32_t wrong_plane_id = 0;
> +	int ret = 0;
>   	igt_output_t *output =
>   		connector_id_to_output(&data->master.display,
>   				       data->connector_id);
> @@ -351,9 +352,10 @@ static void setcrtc_implicit_plane(data_t *data)
>   	/* sanity check */
>   	do_or_die(drmModeSetCrtc(data->master.fd, data->crtc_id, -1,
>   				 0, 0, object_ids, 1, mode));

If we've a failure in this check, will this not affect the following 
subtests? Might lead to similar failure?

Thanks,
Karthik.B.S
> -	do_or_die(drmModeSetCrtc(mcl.fd, data->crtc_id, -1,
> -				 0, 0, object_ids, 1, mode));
> +	ret = drmModeSetCrtc(mcl.fd, data->crtc_id, -1, 0, 0, object_ids,
> +			     1, mode);
>   	close(mcl.fd);
> +	igt_assert_eq(ret, 0);
>   
>   	object_ids[mcl.object_count++] = wrong_plane_id;
>   	do_or_die(create_lease(data->master.fd, &mcl));

  reply	other threads:[~2023-01-19  6:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17  8:05 [igt-dev] [PATCH i-g-t] tests/kms_lease: close mcl.fd when drmModeSetCrtc fails Mohammed Thasleem
2023-01-17 14:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-01-17 17:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-01-18  6:47 ` [igt-dev] [PATCH i-g-t] " Karthik B S
2023-01-18  7:33 ` Mohammed Thasleem
2023-01-19  6:34   ` Karthik B S [this message]
2023-01-18  8:09 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_lease: close mcl.fd when drmModeSetCrtc fails (rev2) Patchwork
2023-01-19  0:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-01-30  9:47 ` [igt-dev] [PATCH i-g-t] tests/kms_lease: close mcl.fd when drmModeSetCrtc fails Mohammed Thasleem
2023-02-01 10:12   ` Mohammed Thasleem
2023-02-02 11:38     ` Karthik B S
2023-01-30 10:21 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_lease: close mcl.fd when drmModeSetCrtc fails (rev3) Patchwork
2023-01-30 11:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-02-01 10:44 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_lease: close mcl.fd when drmModeSetCrtc fails (rev4) Patchwork
2023-02-01 11:53 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=ef066db6-395e-5c68-9a15-bd2089ea825c@intel.com \
    --to=karthik.b.s@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