diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-10-03 20:43:49 +0100 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-10-04 15:44:09 +0300 |
commit | 519003cace0c32aa226005dc7409544e26c243c2 (patch) | |
tree | ebbc2d82b3c547d33477c05417602ecb95d431cc /tests/kms_fbcon_fbt.c | |
parent | 596f48dcd59fd2f8c16671514f3e69d4a2891374 (diff) |
igt: Check drmModeGetResources()
If KMS is not supported on the device, drmModeGetResources() will return
NULL, often this is an indication that we should not attempt to run the
test. Although it would be preferred to use something like
igt_require_display() as the canonical check and assert that
drmModeGetResources() did not hit an error, it is not always practical
as the tests do not utilize the common igt_display abstraction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/kms_fbcon_fbt.c')
-rw-r--r-- | tests/kms_fbcon_fbt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index 8de3da83..24d3ad90 100644 --- a/tests/kms_fbcon_fbt.c +++ b/tests/kms_fbcon_fbt.c @@ -63,6 +63,7 @@ static void setup_drm(struct drm_info *drm) drm->debugfs_fd = igt_debugfs_dir(drm->fd); drm->res = drmModeGetResources(drm->fd); + igt_require(drm->res); igt_assert(drm->res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < drm->res->count_connectors; i++) |