[igt-dev] [PATCH i-g-t 1/2] lib: Skip tests that require fb modifiers when KMS is disabled

Chris Wilson chris at chris-wilson.co.uk
Sat Oct 13 10:20:09 UTC 2018


Quoting José Roberto de Souza (2018-10-12 22:28:26)
> When KMS is disabled, drmGetCap() for DRM_CAP_ADDFB2_MODIFIERS() will
> return -1 and set errno as EOPNOTSUPP, the current assert was only
> checking for a sucess result or invalid argument causing
> prime_vgem at basic-fence-flip test to fail when KMS is disabled.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  lib/ioctl_wrappers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 0929c43f..bda9a764 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -1661,7 +1661,7 @@ void igt_require_fb_modifiers(int fd)
>                 int ret;
>  
>                 ret = drmGetCap(fd, DRM_CAP_ADDFB2_MODIFIERS, &cap_modifiers);
> -               igt_assert(ret == 0 || errno == EINVAL);
> +               igt_assert(ret == 0 || errno == EINVAL || errno == EOPNOTSUPP);

I just think this is a dumb assert, but that's just me. I suggested we
remove it since it is not essential for answering the question of
whether we have the *cap* and that is *all* that is being asked here,
but something has to be done.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list