[igt-dev] [PATCH 1/2] lib/drmtest: add igt_debug when forced and dev_name doesn't match

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Oct 9 16:08:05 UTC 2023


Hi Helen,
On 2023-10-08 at 19:23:05 -0300, Helen Koike wrote:
> Make it easier to understand what was the expected string.
> 
> Signed-off-by: Helen Koike <helen.koike at collabora.com>
> ---
>  lib/drmtest.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index e1da66c87..98910a84c 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -260,8 +260,11 @@ static int open_device(const char *name, unsigned int chipset)
>  		goto err;
>  
>  	forced = forced_driver();
> -	if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name))
> +	if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name)) {
> +		igt_debug("Expected driver \"%s\" but got \"%s\"\n",
> +				  forced, dev_name);
>  		goto err;
> +	}

Looks good,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

>  
>  	for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
>  		int mid = start + (end - start) / 2;
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list