[igt-dev] [PATCH i-g-t] tests/kms_chamelium: check whether EDID blob is non-NULL before trying to read it
Simon Ser
simon.ser at intel.com
Fri Aug 16 13:50:36 UTC 2019
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 at 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
More information about the igt-dev
mailing list