Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v3] tests/kms_3d: Add more logs to skips/failure
@ 2024-08-28  9:27 Pranay Samala
  2024-08-28 10:43 ` ✓ CI.xeBAT: success for tests/kms_3d: Add more logs to skips/failure (rev3) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pranay Samala @ 2024-08-28  9:27 UTC (permalink / raw)
  To: igt-dev; +Cc: jeevan.b, bhanuprakash.modem, sameer.lattannavar, pranay.samala

Having some logs for test failures and skips would
make debugging much easier.

Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 tests/kms_3d.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/kms_3d.c b/tests/kms_3d.c
index ad6c45e9b..e1c024066 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -55,17 +55,19 @@ igt_simple_main
 	res = drmModeGetResources(drm_fd);
 	igt_require(res);
 
-	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++) {
 		connector = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]);
-		if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)
+		if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA &&
+		    connector->connection == DRM_MODE_CONNECTED)
 			break;
 		drmModeFreeConnector(connector);
 		connector = NULL;
 	}
-	igt_require(connector);
+	igt_require_f(connector, "No HDMI connector found.\n");
 
 	kmstest_unset_all_crtcs(drm_fd, res);
 
@@ -85,7 +87,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 +97,12 @@ 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("%s-%d: Doesn't support 3D MASK.\n",
+				 kmstest_connector_type_str(connector->connector_type),
+				 connector->connector_type_id);
 			continue;
+		}
 
 		/* create a configuration */
 		ret = kmstest_get_connector_config(drm_fd, connector_id,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-29  8:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28  9:27 [PATCH i-g-t v3] tests/kms_3d: Add more logs to skips/failure Pranay Samala
2024-08-28 10:43 ` ✓ CI.xeBAT: success for tests/kms_3d: Add more logs to skips/failure (rev3) Patchwork
2024-08-28 10:53 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-28 15:34 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-29  8:46 ` ✗ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox