[Piglit] [PATCH] egl_ext_device_drm: don't fail the test if open("/dev/dri/cardX") errors

Dylan Baker dylan at pnwbakers.com
Fri Oct 5 18:13:16 UTC 2018


In other cases like this we return skip instead of warn. I think that it should
be skip because:

1) warn doesn't have any real meaning
2) we couldn't actually run the test so there isn't a result

Dylan

Quoting Emil Velikov (2018-10-03 05:21:56)
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> As pointed out by Mathias opening the card node can fail in some cases.
> In boils down to a) the node is owned by root:video b) by default, the
> user is not part of the video group c) logind dynamically allows any
> user to open the node, once a user has logged-in.
> 
> Thus if we use a remote machine accessible only over ssh, the test will
> fail. A fairly common setup that one could use for their CI.
> 
> Demote the failure to a warning.
> 
> Cc: Mathias Fröhlich <mathias.froehlich at web.de>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c b/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c
> index 537c8b60f..2236783c8 100644
> --- a/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c
> +++ b/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c
> @@ -162,7 +162,9 @@ main(void)
>                 if (fd < 0) {
>                         printf("Failed to open drm device file %s: %s\n",
>                                 devstring, strerror(errno));
> -                       piglit_report_result(PIGLIT_FAIL);
> +                       printf("Make sure you have permissions to open %s\n");
> +                       result = PIGLIT_WARN;
> +                       continue;
>                 }
>  #ifndef EGL_DRM_MASTER_FD_EXT
>  #define EGL_DRM_MASTER_FD_EXT                   0x333C
> -- 
> 2.19.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20181005/b29ec660/attachment.sig>


More information about the Piglit mailing list