mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 01:16:18 +00:00
tests: Fix fallout from s/EBADF/ENOENT/ in 2.6.36
After bf79cb914dbfe848add8bb76cbb8ff89110d29ff, drm uses ENOENT to report unknown handles buffer objects, update the tests accordingly. Fixes: Bug 29794 - some intel_gpu_tools cases fail https://bugs.freedesktop.org/show_bug.cgi?id=29794 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
14618620cc
commit
c935c60214
@ -98,7 +98,7 @@ test_bad_flink(int fd)
|
|||||||
|
|
||||||
flink.handle = 0x10101010;
|
flink.handle = 0x10101010;
|
||||||
ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
|
ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
|
||||||
assert(ret == -1 && errno == EBADF);
|
assert(ret == -1 && errno == ENOENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -76,7 +76,7 @@ int main(int argc, char **argv)
|
|||||||
mmap.size = 4096;
|
mmap.size = 4096;
|
||||||
printf("Testing mmaping of bad object.\n");
|
printf("Testing mmaping of bad object.\n");
|
||||||
ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap);
|
ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap);
|
||||||
assert(ret == -1 && errno == EBADF);
|
assert(ret == -1 && errno == ENOENT);
|
||||||
|
|
||||||
memset(&create, 0, sizeof(create));
|
memset(&create, 0, sizeof(create));
|
||||||
create.size = OBJECT_SIZE;
|
create.size = OBJECT_SIZE;
|
||||||
|
@ -127,11 +127,11 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
printf("Testing read of bad buffer handle\n");
|
printf("Testing read of bad buffer handle\n");
|
||||||
ret = do_read(fd, 1234, buf, 0, 1024);
|
ret = do_read(fd, 1234, buf, 0, 1024);
|
||||||
assert(ret == -1 && errno == EBADF);
|
assert(ret == -1 && errno == ENOENT);
|
||||||
|
|
||||||
printf("Testing write of bad buffer handle\n");
|
printf("Testing write of bad buffer handle\n");
|
||||||
ret = do_write(fd, 1234, buf, 0, 1024);
|
ret = do_write(fd, 1234, buf, 0, 1024);
|
||||||
assert(ret == -1 && errno == EBADF);
|
assert(ret == -1 && errno == ENOENT);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user