[PATCH i-g-t v2] tests/kms_content_protection: Skip empty vendor names in blocklist
Santhosh Reddy Guddati
santhosh.reddy.guddati at intel.com
Mon Jun 9 07:32:28 UTC 2025
Avoids false positives by returning false early when the vendor name is
NULL, empty, or a single whitespace character.
log message in kms_content_protection by printing skipped outputs instead
of asserting.
V2: Add Fixes tag (Suraj)
Fixes: 6a256bfe3 (tests/kms_content_protection: Whitelist check for panel
support)
Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
lib/igt_panel.c | 8 ++++++--
tests/kms_content_protection.c | 9 ++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/lib/igt_panel.c b/lib/igt_panel.c
index c89bf9123..c51fd7d54 100644
--- a/lib/igt_panel.c
+++ b/lib/igt_panel.c
@@ -20,11 +20,15 @@
* true if the vendor name is found in the blocklist, false otherwise.
*/
bool igt_is_panel_blocked(const char *vendor_name,
- const char *const blocklist[],
- size_t blocklist_size)
+ const char *const blocklist[],
+ size_t blocklist_size)
{
int i;
+ if (!vendor_name || vendor_name[0] == '\0' ||
+ (vendor_name[0] == ' ' && vendor_name[1] == '\0'))
+ return false;
+
for (i = 0; i < blocklist_size; i++) {
if (strstr(blocklist[i], vendor_name) != NULL)
return true;
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index b0d0b0234..51fc1d3be 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -637,9 +637,6 @@ test_content_protection(enum igt_commit_style commit_style, int content_type)
}
for_each_connected_output(display, output) {
- igt_require_f(!is_output_hdcp_test_exempt(output),
- "Skipped as the panel is blacklisted");
-
for_each_pipe(display, pipe) {
igt_display_reset(display);
@@ -652,6 +649,12 @@ test_content_protection(enum igt_commit_style commit_style, int content_type)
if (!output_hdcp_capable(output, content_type))
continue;
+ if (is_output_hdcp_test_exempt(output)) {
+ igt_info("Skipping HDCP test on %s, as the panel is blocklisted\n",
+ output->name);
+ continue;
+ }
+
igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name)
test_content_protection_on_output(output, pipe, commit_style, content_type);
--
2.34.1
More information about the igt-dev
mailing list