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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 26, 2016 at 12:50:07PM -0400, Robert Foss wrote:
> 
> 
> On 04/26/2016 10:10 AM, Daniel Vetter wrote:
> >On Fri, Apr 22, 2016 at 05:24:59PM -0400, robert.foss@xxxxxxxxxxxxx wrote:
> >>From: Robert Foss <robert.foss@xxxxxxxxxxxxx>
> >>
> >>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@xxxxxxxxxxxxx>
> >>---
> >>  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
> >
> >
> But isn't there already a check like that in trunk?
> 
> 	int valid_tests = 0;
> 	for_each_connected_output {
> 		/* test code */
> 		valid_tests++;
> 	}
> 	igt_require_f(valid_tests, "no valid crtc/connector\n");

Oops, didn't read the existing code carefully enough.

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> 
> >>
> >>  		pipe = output->config.pipe;
> >>  		igt_output_set_pipe(output, pipe);
> >>--
> >>2.5.0
> >>
> >

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux