[Intel-gfx] [PATCH i-g-t 6/7] kms_panel_fitting: Don't skip test after finding an incompatible connector.

Daniel Vetter daniel at ffwll.ch
Tue Apr 26 14:10:14 UTC 2016


On Fri, Apr 22, 2016 at 05:24:59PM -0400, robert.foss at collabora.com wrote:
> From: Robert Foss <robert.foss at collabora.com>
> 
> If an incompatible connector is found, don't skip the test,
> but rather keep looking for valid connectors.
> 
> Signed-off-by: Robert Foss <robert.foss at collabora.com>
> ---
>  tests/kms_panel_fitting.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 2398a5e..60a22b0 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -140,8 +140,9 @@ static void test_panel_fitting(data_t *d)
>  	for_each_connected_output(display, output) {
>  		drmModeModeInfo *mode, native_mode;
>  
> -		igt_require(output->config.connector->connector_type ==
> -			DRM_MODE_CONNECTOR_eDP);
> +		if (output->config.connector->connector_type !=
> +			DRM_MODE_CONNECTOR_eDP)
> +			continue;

Needs a counter to make sure we end up at least with one successful run.
See e.g kms_cursor_crc.

for_each_config {

	if (unsuitable_conntector)
		continue;

	/* test code */

	valid_configs++;
}

igt_require(valid_configs);

I thought about extracting this into an igt block as a helper, but every
tests has it's own idea of how to write for_each_config and when to skip.
So hand-rolling everywhere unfortunately :(
-Daniel


>  
>  		pipe = output->config.pipe;
>  		igt_output_set_pipe(output, pipe);
> -- 
> 2.5.0
> 

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


More information about the Intel-gfx mailing list