Skip to contentSkip to conversation

tests/kms_hdmi_inject: Retry ELD check to avoid transient audio races

PATCH New Jeevan B 1 participant 1 message Apr 27

lore
Share & tools
lore

Jeevan B

author
#0 lore raw

PATCH 1/1 tests/kms_hdmi_inject: Retry ELD check to avoid transient audio races

ELD population can lag HDMI audio enable on some platforms. Retry once to avoid spurious test failures.

---
 tests/kms_hdmi_inject.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
tests/kms_hdmi_inject.c +7 -1
index 00eb5e4a4..f388a84c3 100644
@@ -200,7 +200,13 @@ hdmi_inject_audio(int drm_fd, drmModeConnector *connector)
 	 * Test if we have /proc/asound/HDMI/eld#0.0 and is its contents are
 	 * valid.
 	 */
-	igt_assert(eld_has_igt());
+	if (!eld_has_igt()) {
+		igt_info("HDMI audio enabled but ELD not visible yet; retrying\n");
+		usleep(200 * 1000);
+
+		igt_assert_f(eld_has_igt(),
+			     "HDMI ELD missing after retry\n");
+	}
 
 	igt_remove_fb(drm_fd, &fb);
 
Signature · 1 line
2.43.0