diff options
Diffstat (limited to 'tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c')
| -rw-r--r-- | tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c index 5f541522364f..fc9694fc4e89 100644 --- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c +++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c @@ -15,7 +15,7 @@ #include <linux/dma-buf.h> #include <linux/dma-heap.h> #include <drm/drm.h> -#include "../kselftest.h" +#include "kselftest.h" #define DEVPATH "/dev/dma_heap" @@ -29,9 +29,11 @@ static int check_vgem(int fd) version.name = name; ret = ioctl(fd, DRM_IOCTL_VERSION, &version); - if (ret) + if (ret || version.name_len != 4) return 0; + name[4] = '\0'; + return !strcmp(name, "vgem"); } |
