[igt-dev] [PATCH 2/2] core_getversion: drop unused assert

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


Hi Helen,
On 2023-10-08 at 19:23:06 -0300, Helen Koike wrote:
> If IGT_FORCE_DRIVER is used, open_device() already checks if the name
> matches, so igt_assert_fd(fd) is already enough.
> 
> Signed-off-by: Helen Koike <helen.koike at collabora.com>

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

> ---
>  tests/core_getversion.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/tests/core_getversion.c b/tests/core_getversion.c
> index 8c8e0c9a3..9945c3855 100644
> --- a/tests/core_getversion.c
> +++ b/tests/core_getversion.c
> @@ -48,7 +48,6 @@ igt_simple_main
>  {
>  	int fd;
>  	drmVersionPtr v;
> -	const char *name = getenv("IGT_FORCE_DRIVER");
>  
>  	fd = __drm_open_driver(DRIVER_ANY);
>  	igt_assert_fd(fd);
> @@ -58,11 +57,6 @@ igt_simple_main
>  	igt_assert_neq(strlen(v->desc), 0);
>  	if (is_i915_device(fd))
>  		igt_assert_lte(1, v->version_major);
> -	if (name) {
> -		igt_assert_f(!strcmp(name, v->name),
> -			     "Expected driver \"%s\" but got \"%s\"\n",
> -			     name, v->name);
> -	}
>  
>  	drmFree(v);
>  	drm_close_driver(fd);
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list