diff options
author | Simon Ser <simon.ser@intel.com> | 2019-08-16 16:47:13 +0300 |
---|---|---|
committer | Simon Ser <simon.ser@intel.com> | 2019-08-19 12:54:59 +0300 |
commit | 0bf74af39ede5fa26195e4e7da590b3d0b729469 (patch) | |
tree | fc434411e133920e744303ddf6cae8297561d7b8 /tests/kms_chamelium.c | |
parent | 93129f55ba9e1b8f4a9246161ea981205fc72b08 (diff) |
tests/kms_chamelium: check whether EDID blob is non-NULL before trying to read it
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
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/kms_chamelium.c')
-rw-r--r-- | tests/kms_chamelium.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c index 0cf1bfbd..756e59ba 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)); |