diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-05-09 17:28:49 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-05-09 17:28:51 +0200 |
commit | 012ad453d86a4401b8377b6ab2d4eaeaf731914e (patch) | |
tree | bdd2f9ea43512aaae418250efd73965cb75666d2 /tests/kms_cursor_legacy.c | |
parent | d099f7d5a5b4b5b86ba751c43eb2772317a0c892 (diff) |
tests/kms_cursor_legacy: Fix failing tests harder
Also allow the initial vblank evasion to fail. This was the most
likely cause of the test failure, so be sure to fix it too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/kms_cursor_legacy.c')
-rw-r--r-- | tests/kms_cursor_legacy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index 3eef7f7a..ac05ca53 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -635,14 +635,18 @@ static void basic_flip_cursor(igt_display_t *display, transition_nonblocking(display, pipe, &fb_info, &argb_fb, 0); break; } - igt_assert_eq(get_vblank(display->drm_fd, pipe, 0), vblank_start); + + delta = get_vblank(display->drm_fd, pipe, 0) - vblank_start; + miss = delta != 0; do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]); break; case FLIP_AFTER_CURSOR: do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]); - igt_assert_eq(get_vblank(display->drm_fd, pipe, 0), vblank_start); + + delta = get_vblank(display->drm_fd, pipe, 0) - vblank_start; + miss = delta != 0; switch (mode) { default: @@ -663,7 +667,9 @@ static void basic_flip_cursor(igt_display_t *display, finish_fb_busy(busy); } - if (!cursor_slowpath(mode)) + if (miss) + { /* compare nothing, already failed */ } + else if (!cursor_slowpath(mode)) miss = delta != 0; else miss = delta != 0 && delta != 1; |