[PATCH i-g-t] tests/kms_3d: Add more logs to skips/failure
B, Jeevan
jeevan.b at intel.com
Tue Aug 20 04:54:50 UTC 2024
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Pranay
> Samala
> Sent: Monday, August 5, 2024 12:17 PM
> To: igt-dev at lists.freedesktop.org
> Cc: B S, Karthik <karthik.b.s at intel.com>; Modem, Bhanuprakash
> <bhanuprakash.modem at intel.com>; Lattannavar, Sameer
> <sameer.lattannavar at intel.com>; Samala, Pranay
> <pranay.samala at intel.com>
> Subject: [PATCH i-g-t] tests/kms_3d: Add more logs to skips/failure
>
> Having some logs for test failures and skips would make debugging much
> easier.
Check the commit message once.
LGTM apart from that.
Reviewed-by: Jeevan B <jeevan.b at intel.com>
>
> Signed-off-by: Pranay Samala <pranay.samala at intel.com>
> ---
> tests/kms_3d.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_3d.c b/tests/kms_3d.c index ad6c45e9b..f79fa62da
> 100644
> --- a/tests/kms_3d.c
> +++ b/tests/kms_3d.c
> @@ -53,9 +53,10 @@ igt_simple_main
> drm_fd = drm_open_driver_master(DRIVER_ANY);
>
> res = drmModeGetResources(drm_fd);
> - igt_require(res);
> + igt_require_f(res, "Failed to get list of a DRM device's major
> +resources\n");
>
> - igt_assert(drmSetClientCap(drm_fd, DRM_CLIENT_CAP_STEREO_3D,
> 1) >= 0);
> + igt_assert_f(drmSetClientCap(drm_fd,
> DRM_CLIENT_CAP_STEREO_3D, 1) >= 0,
> + "Failed to enable STEREO_3D capability\n");
>
> /* find an hdmi connector */
> for (int i = 0; i < res->count_connectors; i++) { @@ -65,7 +66,7 @@
> igt_simple_main
> drmModeFreeConnector(connector);
> connector = NULL;
> }
> - igt_require(connector);
> + igt_require_f(connector, "Unable to get HDMI Connector\n");
>
> kmstest_unset_all_crtcs(drm_fd, res);
>
> @@ -85,7 +86,7 @@ igt_simple_main
> mode_count++;
> }
>
> - igt_assert(mode_count);
> + igt_assert_f(mode_count, "3D modes not detected\n");
>
> /* set 3D modes */
> igt_info("Testing:\n");
> @@ -95,8 +96,10 @@ igt_simple_main
> int crtc_mask = -1;
> int ret;
>
> - if (!(connector->modes[i].flags &
> DRM_MODE_FLAG_3D_MASK))
> + if (!(connector->modes[i].flags &
> DRM_MODE_FLAG_3D_MASK)) {
> + igt_info("%i: Doesn't support 3D MASK\n", res-
> >connectors[i]);
> continue;
> + }
>
> /* create a configuration */
> ret = kmstest_get_connector_config(drm_fd, connector_id,
> @@ -120,7 +123,7 @@ igt_simple_main
> &connector->connector_id, 1,
> &connector->modes[i]);
>
> - igt_assert(ret == 0);
> + igt_assert_f(ret == 0, "Unable to set CRTC\n");
> }
>
> kmstest_force_connector(drm_fd, connector,
> FORCE_CONNECTOR_UNSPECIFIED);
> --
> 2.34.1
More information about the igt-dev
mailing list