[PATCH i-g-t] tests/kms_content_protection: Skip empty vendor names in blocklist
Kandpal, Suraj
suraj.kandpal at intel.com
Wed Jun 11 10:38:48 UTC 2025
> -----Original Message-----
> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> Sent: Monday, June 9, 2025 12:30 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>; Kandpal, Suraj
> <suraj.kandpal at intel.com>; Thasleem, Mohammed
> <mohammed.thasleem at intel.com>; Joshi, Kunal1 <kunal1.joshi at intel.com>;
> Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> Subject: [PATCH i-g-t] tests/kms_content_protection: Skip empty vendor
> names in blocklist
>
> 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.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal 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