Message ID | 1454334242-23354-6-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Feb 01, 2016 at 02:44:01PM +0100, Maarten Lankhorst wrote: > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > --- > diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c > index bd80caeffd82..f827d0008f7b 100644 > --- a/tests/kms_force_connector_basic.c > +++ b/tests/kms_force_connector_basic.c > @@ -52,6 +52,8 @@ static void reset_connectors(void) > > drmModeFreeConnector(connector); > } > + > + igt_set_module_param_int("load_detect_test", 0); > } > > static int opt_handler(int opt, int opt_index, void *data) > @@ -108,6 +110,17 @@ int main(int argc, char **argv) > igt_skip_on(vga_connector->connection == DRM_MODE_CONNECTED); > } > > + igt_subtest("force-load-detect") { > + igt_set_module_param_int("load_detect_test", 1); Ah here's the testcase. We need to unset this module parameter again at the end of the testcase - atm the magic exithandler stuff only works on binary exit, not when leaving a subtests (for things set within a subtest). With that done Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> We should probably fix that issue in the exit handler code, but that's another task really. -Daniel > + > + temp = drmModeGetConnectorCurrent(drm_fd, > + vga_connector->connector_id); > + > + igt_assert(temp->connection != DRM_MODE_UNKNOWNCONNECTION); > + > + drmModeFreeConnector(temp); > + } > + > igt_subtest("force-connector-state") { > igt_display_t display; > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Op 11-02-16 om 09:59 schreef Daniel Vetter: > On Mon, Feb 01, 2016 at 02:44:01PM +0100, Maarten Lankhorst wrote: >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >> --- >> diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c >> index bd80caeffd82..f827d0008f7b 100644 >> --- a/tests/kms_force_connector_basic.c >> +++ b/tests/kms_force_connector_basic.c >> @@ -52,6 +52,8 @@ static void reset_connectors(void) >> >> drmModeFreeConnector(connector); >> } >> + >> + igt_set_module_param_int("load_detect_test", 0); >> } >> >> static int opt_handler(int opt, int opt_index, void *data) >> @@ -108,6 +110,17 @@ int main(int argc, char **argv) >> igt_skip_on(vga_connector->connection == DRM_MODE_CONNECTED); >> } >> >> + igt_subtest("force-load-detect") { >> + igt_set_module_param_int("load_detect_test", 1); > Ah here's the testcase. We need to unset this module parameter again at > the end of the testcase - atm the magic exithandler stuff only works on > binary exit, not when leaving a subtests (for things set within a > subtest). > > With that done Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > We should probably fix that issue in the exit handler code, but that's > another task really. > Yeah, but pushed the fixed version for now. Thanks!
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c index bd80caeffd82..f827d0008f7b 100644 --- a/tests/kms_force_connector_basic.c +++ b/tests/kms_force_connector_basic.c @@ -52,6 +52,8 @@ static void reset_connectors(void) drmModeFreeConnector(connector); } + + igt_set_module_param_int("load_detect_test", 0); } static int opt_handler(int opt, int opt_index, void *data) @@ -108,6 +110,17 @@ int main(int argc, char **argv) igt_skip_on(vga_connector->connection == DRM_MODE_CONNECTED); } + igt_subtest("force-load-detect") { + igt_set_module_param_int("load_detect_test", 1); + + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + + igt_assert(temp->connection != DRM_MODE_UNKNOWNCONNECTION); + + drmModeFreeConnector(temp); + } + igt_subtest("force-connector-state") { igt_display_t display;
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> ---