projects
/
profile
/
ivi
/
libdrm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add tag and changes
[profile/ivi/libdrm.git]
/
tests
/
gem_mmap.c
diff --git
a/tests/gem_mmap.c
b/tests/gem_mmap.c
index
c3a5188
..
2239789
100644
(file)
--- a/
tests/gem_mmap.c
+++ b/
tests/gem_mmap.c
@@
-81,7
+81,11
@@
int main(int argc, char **argv)
int ret;
int handle;
int ret;
int handle;
- fd = drm_open_any();
+ fd = drm_open_matching("8086:*", 0);
+ if (fd < 0) {
+ fprintf(stderr, "failed to open intel drm device, skipping\n");
+ return 0;
+ }
memset(&mmap, 0, sizeof(mmap));
mmap.handle = 0x10101010;
memset(&mmap, 0, sizeof(mmap));
mmap.handle = 0x10101010;
@@
-89,7
+93,7
@@
int main(int argc, char **argv)
mmap.size = 4096;
printf("Testing mmaping of bad object.\n");
ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap);
mmap.size = 4096;
printf("Testing mmaping of bad object.\n");
ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap);
- assert(ret == -1 && errno == E
INVAL
);
+ assert(ret == -1 && errno == E
NOENT
);
memset(&create, 0, sizeof(create));
create.size = OBJECT_SIZE;
memset(&create, 0, sizeof(create));
create.size = OBJECT_SIZE;