[igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add timeouts to opening pipe CRC fd.

Dhinakaran Pandiyan dhinakaran.pandiyan at intel.com
Fri Apr 6 18:17:03 UTC 2018




On Thu, 2018-04-05 at 12:49 +0200, Maarten Lankhorst wrote:
> This will fix the PSR tests to fail slightly faster, since they wait
> indefinitely for a CRC that never comes during open.
> 

While we need to figure out how to run these tests without CRC, timing
out the tests makes sense.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  lib/igt_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 8adc02e9cc47..094df564b6f4 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -757,7 +757,10 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  
>  	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>  
> +	igt_set_timeout(5, "Opening crc fd, which waits for first CRC.");
>  	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
> +	igt_reset_timeout();
> +
>  	igt_assert(pipe_crc->crc_fd != -1);
>  	errno = 0;
>  }



More information about the igt-dev mailing list