From 012ad453d86a4401b8377b6ab2d4eaeaf731914e Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 9 May 2017 17:28:49 +0200 Subject: 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 --- tests/kms_cursor_legacy.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/kms_cursor_legacy.c') 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; -- cgit v1.2.3