[PATCH i-g-t v2] tests/kms_content_protection: Skip empty vendor names in blocklist

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Jun 11 17:41:11 UTC 2025


Hi Santhosh,
On 2025-06-09 at 13:02:28 +0530, Santhosh Reddy Guddati wrote:
> 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.

Technically igt_require() skips this and all next, it is not assert.

> 
> V2: Add Fixes tag (Suraj)
> 
> Fixes: 6a256bfe3 (tests/kms_content_protection: Whitelist check for panel
> support)

No empty line after 'Fixes: ' and s-o-b, also please use correct format:

Fixes: 6a256bfe3025 ("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 ++++++--

Please split this into two patches, one for a fix,
second for functional change from igt_require (which skips tests)
into continue testing.


>  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;

Correct align, you can use checkpatch.pl script from Linux kernel.
See CONTRIBUTING.md for some helpfull options.

> +
>  	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);

Same here, align.

Regards,
Kamil

> +				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