public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_chamelium: check whether EDID blob is non-NULL before trying to read it
Date: Fri, 16 Aug 2019 16:50:36 +0300	[thread overview]
Message-ID: <20190816135036.6083-1-simon.ser@intel.com> (raw)

test_edid_read sets an EDID on a port, plugs it and reads it back. Sometimes
retrieving the blob fails. Check whether the blob is set at all before trying
to get it. This makes it obvious it's not drmModeGetPropertyBlob failing for
another reason.

Signed-off-by: Simon Ser <simon.ser@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106766
---

Note to self: need to update filters before merging

 tests/kms_chamelium.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 0cf1bfbdeaee..756e59baf63b 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -309,6 +309,7 @@ test_edid_read(data_t *data, struct chamelium_port *port, enum test_edid edid)
 	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
 					DRM_MODE_OBJECT_CONNECTOR, "EDID", NULL,
 					&edid_blob_id, NULL));
+	igt_assert(edid_blob_id != 0);
 	igt_assert(edid_blob = drmModeGetPropertyBlob(data->drm_fd,
 						      edid_blob_id));

--
2.22.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-08-16 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 13:50 Simon Ser [this message]
2019-08-16 14:15 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_chamelium: check whether EDID blob is non-NULL before trying to read it Patchwork
2019-08-17  5:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-08-19  7:35 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler

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=20190816135036.6083-1-simon.ser@intel.com \
    --to=simon.ser@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