[igt-dev] [PATCH i-g-t 1/1] tests/pm_rpm: Assert that we get connector data

Petri Latvala petri.latvala at intel.com
Thu Nov 8 10:33:15 UTC 2018


https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5088/fi-byt-clapper/igt@pm_rpm@module-reload.html
shows the test crashing in get_connector_edid. Directly there, not in
any libdrm function. The only way I see that can happen is if
drmModeGetConnectorCurrent() returned NULL.

TODO: Change commit message from random guessing to an explanation of
an actual cause.

References: https://bugs.freedesktop.org/show_bug.cgi?id=108675
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 tests/pm_rpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 7488efd7..547e08aa 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -396,6 +396,7 @@ static void init_mode_set_data(struct mode_set_data *data)
 		for (int i = 0; i < data->res->count_connectors; i++) {
 			data->connectors[i] = drmModeGetConnectorCurrent(drm_fd,
 									 data->res->connectors[i]);
+			igt_assert(data->connectors[i]);
 			data->edids[i] = get_connector_edid(data->connectors[i], i);
 		}
 
-- 
2.18.0



More information about the igt-dev mailing list