[Intel-gfx] [PATCH i-g-t 2/8] kms_frontbuffer_tracking: Skip on unreliable CRC.

Daniel Vetter daniel at ffwll.ch
Wed Dec 2 23:50:00 PST 2015


On Thu, Nov 05, 2015 at 10:53:28AM -0800, Rodrigo Vivi wrote:
> Even with all sink crc re-works we still have platforms
> where after 6 vblanks it is unable to calculate the
> sink crc. But if we don't get the sink crc it isn't true
> that test failed, but that we have no ways to say test
> passed or failed.
> 
> So let's print a message and move forward in case sink crc
> cannot help us to know if the screen has been updated.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  tests/kms_frontbuffer_tracking.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index cd2879d..606d0a9 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -858,10 +858,17 @@ static bool psr_wait_until_enabled(void)
>  
>  static void get_sink_crc(sink_crc_t *crc)
>  {
> +	int rc, errno_;
> +
>  	lseek(sink_crc.fd, 0, SEEK_SET);
>  
> -	igt_assert(read(sink_crc.fd, crc->data, SINK_CRC_SIZE) ==
> -		   SINK_CRC_SIZE);
> +	rc = read(sink_crc.fd, crc->data, SINK_CRC_SIZE);
> +	errno_ = errno;
> +
> +	if (rc == -1 && errno_ == ETIMEDOUT)
> +		igt_skip("Sink CRC is unreliable on this machine. Try running this test again individually\n");

igt_skip_on, just as an aside.
-Daniel

> +
> +	igt_assert(rc == SINK_CRC_SIZE);
>  }
>  
>  static bool sink_crc_equal(sink_crc_t *a, sink_crc_t *b)
> -- 
> 2.4.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list