Commit c935c602 authored by Chris Wilson's avatar Chris Wilson 🤔

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=29794Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 14618620
......@@ -98,7 +98,7 @@ test_bad_flink(int fd)
flink.handle = 0x10101010;
ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
assert(ret == -1 && errno == EBADF);
assert(ret == -1 && errno == ENOENT);
}
static void
......
......@@ -76,7 +76,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);
assert(ret == -1 && errno == EBADF);
assert(ret == -1 && errno == ENOENT);
memset(&create, 0, sizeof(create));
create.size = OBJECT_SIZE;
......
......@@ -127,11 +127,11 @@ int main(int argc, char **argv)
printf("Testing read of bad buffer handle\n");
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");
ret = do_write(fd, 1234, buf, 0, 1024);
assert(ret == -1 && errno == EBADF);
assert(ret == -1 && errno == ENOENT);
close(fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment