diff options
author | Chris Wilson | 2010-12-10 06:10:13 -0600 |
---|---|---|
committer | Chris Wilson | 2010-12-10 06:10:13 -0600 |
commit | 000a0972c21ca1a17609e638907607470ee21751 (patch) | |
tree | 4b23a0508084f5c804d0879e5bec0f8a931aacc5 /tests | |
parent | 537703fd4805e9cd352965fce642670986822d22 (diff) | |
download | libdrm-000a0972c21ca1a17609e638907607470ee21751.tar.gz libdrm-000a0972c21ca1a17609e638907607470ee21751.tar.xz libdrm-000a0972c21ca1a17609e638907607470ee21751.zip |
tests: Update for ENOENT returns from unknown handles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_flink.c | 2 | ||||
-rw-r--r-- | tests/gem_mmap.c | 2 | ||||
-rw-r--r-- | tests/gem_readwrite.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_flink.c b/tests/gem_flink.c index ff999d2e..8dc88320 100644 --- a/tests/gem_flink.c +++ b/tests/gem_flink.c | |||
@@ -96,7 +96,7 @@ test_bad_flink(int fd) | |||
96 | 96 | ||
97 | flink.handle = 0x10101010; | 97 | flink.handle = 0x10101010; |
98 | ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink); | 98 | ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink); |
99 | assert(ret == -1 && errno == EBADF); | 99 | assert(ret == -1 && errno == ENOENT); |
100 | } | 100 | } |
101 | 101 | ||
102 | static void | 102 | static void |
diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c index d24005ba..2239789f 100644 --- a/tests/gem_mmap.c +++ b/tests/gem_mmap.c | |||
@@ -93,7 +93,7 @@ int main(int argc, char **argv) | |||
93 | mmap.size = 4096; | 93 | mmap.size = 4096; |
94 | printf("Testing mmaping of bad object.\n"); | 94 | printf("Testing mmaping of bad object.\n"); |
95 | ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap); | 95 | ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap); |
96 | assert(ret == -1 && errno == EBADF); | 96 | assert(ret == -1 && errno == ENOENT); |
97 | 97 | ||
98 | memset(&create, 0, sizeof(create)); | 98 | memset(&create, 0, sizeof(create)); |
99 | create.size = OBJECT_SIZE; | 99 | create.size = OBJECT_SIZE; |
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c index 4f5cde6c..07dc853a 100644 --- a/tests/gem_readwrite.c +++ b/tests/gem_readwrite.c | |||
@@ -127,11 +127,11 @@ int main(int argc, char **argv) | |||
127 | 127 | ||
128 | printf("Testing read of bad buffer handle\n"); | 128 | printf("Testing read of bad buffer handle\n"); |
129 | ret = do_read(fd, 1234, buf, 0, 1024); | 129 | ret = do_read(fd, 1234, buf, 0, 1024); |
130 | assert(ret == -1 && errno == EBADF); | 130 | assert(ret == -1 && errno == ENOENT); |
131 | 131 | ||
132 | printf("Testing write of bad buffer handle\n"); | 132 | printf("Testing write of bad buffer handle\n"); |
133 | ret = do_write(fd, 1234, buf, 0, 1024); | 133 | ret = do_write(fd, 1234, buf, 0, 1024); |
134 | assert(ret == -1 && errno == EBADF); | 134 | assert(ret == -1 && errno == ENOENT); |
135 | 135 | ||
136 | close(fd); | 136 | close(fd); |
137 | 137 | ||