[igt-dev] [PATCH] tests/kms_content_protection: Skip on hdcp_sink_capability is not found.

Mark Yacoub markyacoub at chromium.org
Mon Jun 7 18:31:10 UTC 2021


From: Mark Yacoub <markyacoub at google.com>

[Why]
In some configurations such as kernel 5.4 on Zork with no DP connected,
debugfs will not contain hdcp_sink_capability file.

[How]
Check for hdcp_sink_capability but skip the test if file is not found.

Tested on ChromeOS Zork Kernel 5.4
Signed-off-by: Mark Yacoub <markyacoub at chromium.org>
---
 tests/kms_content_protection.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 1d1a439a..a0a136da 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -402,6 +402,7 @@ static void test_content_protection_on_output(igt_output_t *output,
 static void __debugfs_read(int fd, const char *param, char *buf, int len)
 {
 	len = igt_debugfs_simple_read(fd, param, buf, len);
+	igt_require(len != -ENOENT);
 	if (len < 0)
 		igt_assert_eq(len, -ENODEV);
 }
-- 
2.32.0.rc1.229.g3e70b5a671-goog



More information about the igt-dev mailing list