diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-03-05 15:01:00 -0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-06 18:06:10 +0100 |
commit | 07be8fec156ba8405f2aafa3a37fe29d06893f05 (patch) | |
tree | 0591bf1aca05c2c8f5f89bb0400d948e8a2d0fe6 /tests/kms_mmio_vs_cs_flip.c | |
parent | 14a3d88a0967718124fc3b6c111a877203da025f (diff) |
igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/kms_mmio_vs_cs_flip.c')
-rw-r--r-- | tests/kms_mmio_vs_cs_flip.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/kms_mmio_vs_cs_flip.c b/tests/kms_mmio_vs_cs_flip.c index 00557aa5..b77f7aee 100644 --- a/tests/kms_mmio_vs_cs_flip.c +++ b/tests/kms_mmio_vs_cs_flip.c @@ -127,7 +127,7 @@ static void wait_for_flip(data_t *data, uint32_t flip_handle) if (ret < 0 && errno == EINTR) continue; - igt_assert(ret >= 0); + igt_assert_lte(0, ret); do_or_die(drmHandleEvent(data->drm_fd, &evctx)); } @@ -256,14 +256,14 @@ test_plane(data_t *data, igt_output_t *output, enum pipe pipe, enum igt_plane pl ret = drmModeSetCrtc(data->drm_fd, output->config.crtc->crtc_id, blue_fb.fb_id, 0, 0, &output->id, 1, mode); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); make_gpu_busy(data, blue_fb.gem_handle); data->flip_done = false; ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id, blue_fb.fb_id, DRM_MODE_PAGE_FLIP_EVENT, data); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* * Toggle a fullscreen sprite on and back off. This will result @@ -279,14 +279,14 @@ test_plane(data_t *data, igt_output_t *output, enum pipe pipe, enum igt_plane pl green_fb.fb_id, 0, 0, 0, mode->hdisplay, mode->vdisplay, 0, 0, mode->hdisplay << 16, mode->vdisplay << 16); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); ret = drmModeSetPlane(data->drm_fd, sprite->drm_plane->plane_id, output->config.crtc->crtc_id, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* * Set primary plane to red fb. This should wait for the CS flip @@ -298,7 +298,7 @@ test_plane(data_t *data, igt_output_t *output, enum pipe pipe, enum igt_plane pl ret = drmModeSetCrtc(data->drm_fd, output->config.crtc->crtc_id, red_fb.fb_id, 0, 0, &output->id, 1, mode); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* Make sure the flip has been executed */ wait_for_flip(data, blue_fb.gem_handle); @@ -410,7 +410,7 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe) ret = drmModeSetCrtc(data->drm_fd, output->config.crtc->crtc_id, green_fb.fb_id, 0, 1, &output->id, 1, mode); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* * Make it more likely that the CS flip has been submitted into the @@ -424,7 +424,7 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe) ret = drmModeSetCrtc(data->drm_fd, output->config.crtc->crtc_id, green_fb.fb_id, 0, 0, &output->id, 1, mode); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); make_gpu_busy(data, blue_fb.gem_handle); @@ -435,7 +435,7 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe) data->flip_done = false; ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id, blue_fb.fb_id, DRM_MODE_PAGE_FLIP_EVENT, data); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* * Set primary plane to red fb. This should wait for the CS flip @@ -447,7 +447,7 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe) ret = drmModeSetCrtc(data->drm_fd, output->config.crtc->crtc_id, red_fb.fb_id, 0, 0, &output->id, 1, mode); - igt_assert(ret == 0); + igt_assert_eq(ret, 0); /* Make sure the flip has been executed */ wait_for_flip(data, blue_fb.gem_handle); |