mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 07:00:11 +01:00
tests/gem_flink: Check for MASTER before proceeding
gem_flink|gem_open are DRM_AUTH ioctl, and being lazy we do not establish ourselves as authenticated before testing the ioctls. So instead of aborting, skip the test unless we have root privileges (and so DRM_MASTER and the DRM_AUTH restriction no longer applies). A future test could assert that the flink fails without proper authentication. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43924 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
0ab2251b70
commit
ef20301a11
1 changed files with 6 additions and 1 deletions
|
|
@ -117,10 +117,15 @@ int main(int argc, char **argv)
|
|||
{
|
||||
int fd;
|
||||
|
||||
if (geteuid()) {
|
||||
fprintf(stderr, "requires root privileges, skipping\n");
|
||||
return 77;
|
||||
}
|
||||
|
||||
fd = drm_open_matching("8086:*", 0);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "failed to open intel drm device, skipping\n");
|
||||
return 0;
|
||||
return 77;
|
||||
}
|
||||
|
||||
test_flink(fd);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue