summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-10-03 13:12:07 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2018-10-31 21:15:08 +0000
commit039bbe4a61d1c8270f12aa8e71aca2e8df073cf4 (patch)
tree667e058ccbe20be32f5dde8bb31cd0970950764e
parent486c70cc7a18856bd45559e29873d5a28c942eb7 (diff)
egl_ext_device_drm: don't fail the test if open("/dev/dri/cardX") errors
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. v2: add missing eglTerminate (Mathias) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
-rw-r--r--tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c5
1 files changed, 4 insertions, 1 deletions
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..954ac60c8 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,10 @@ 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;
+ eglTerminate(dpy1);
+ continue;
}
#ifndef EGL_DRM_MASTER_FD_EXT
#define EGL_DRM_MASTER_FD_EXT 0x333C