From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_lease: close mcl.fd when drmModeSetCrtc fails
Date: Wed, 1 Feb 2023 15:42:29 +0530 [thread overview]
Message-ID: <20230201101229.143115-1-mohammed.thasleem@intel.com> (raw)
In-Reply-To: <20230130094701.111985-1-mohammed.thasleem@intel.com>
Close mcl.fd even when drmModeSetCrtc retuns fail.
This will unblock the resources, so that test can
continue to execute on another panels.
v2: Removed if loop and updated the description. (Karthik)
v3: Added igt_assert_eq for both master fd and mcl fd. (Karthik)
v4: Minor updates in description. (Karthik)
Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
tests/kms_lease.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 67e8d3be..6bd5bc15 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, ret_mcl = 0;
igt_output_t *output =
connector_id_to_output(&data->master.display,
data->connector_id);
@@ -349,11 +350,13 @@ static void setcrtc_implicit_plane(data_t *data)
igt_assert_eq(0, prepare_crtc(&data->master, data));
/* sanity check */
- do_or_die(drmModeSetCrtc(data->master.fd, data->crtc_id, -1,
- 0, 0, object_ids, 1, mode));
- do_or_die(drmModeSetCrtc(mcl.fd, data->crtc_id, -1,
- 0, 0, object_ids, 1, mode));
+ ret = drmModeSetCrtc(data->master.fd, data->crtc_id, -1,
+ 0, 0, object_ids, 1, mode);
+ ret_mcl = drmModeSetCrtc(mcl.fd, data->crtc_id, -1,
+ 0, 0, object_ids, 1, mode);
close(mcl.fd);
+ igt_assert_eq(ret, 0);
+ igt_assert_eq(ret_mcl, 0);
object_ids[mcl.object_count++] = wrong_plane_id;
do_or_die(create_lease(data->master.fd, &mcl));
--
2.25.1
next prev parent reply other threads:[~2023-02-01 10:18 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
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 [this message]
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=20230201101229.143115-1-mohammed.thasleem@intel.com \
--to=mohammed.thasleem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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