Message ID | 1461360300-20668-7-git-send-email-robert.foss@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Apr 22, 2016 at 05:24:59PM -0400, robert.foss@collabora.com wrote: > From: Robert Foss <robert.foss@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@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 >
On 04/26/2016 10:10 AM, Daniel Vetter wrote: > On Fri, Apr 22, 2016 at 05:24:59PM -0400, robert.foss@collabora.com wrote: >> From: Robert Foss <robert.foss@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@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 > > 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"); >> >> pipe = output->config.pipe; >> igt_output_set_pipe(output, pipe); >> -- >> 2.5.0 >> >
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@collabora.com wrote: > >>From: Robert Foss <robert.foss@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@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 > > > > > 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@ffwll.ch> > > >> > >> pipe = output->config.pipe; > >> igt_output_set_pipe(output, pipe); > >>-- > >>2.5.0 > >> > >
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; pipe = output->config.pipe; igt_output_set_pipe(output, pipe);