aboutsummaryrefslogtreecommitdiff
path: root/tests/gem_readwrite.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-05-12 15:42:20 -0700
committerEric Anholt <eric@anholt.net>2008-05-12 15:42:20 -0700
commit6e46a3c762919af05fcc6a08542faa7d185487a1 (patch)
treeba73b93a835451b1ddaecdae3c01253021ef53c4 /tests/gem_readwrite.c
parentf650d7240a5b6eea8e605734f1211c20727c21d7 (diff)
[GEM] Update testcases for new API.
Diffstat (limited to 'tests/gem_readwrite.c')
-rw-r--r--tests/gem_readwrite.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index 1cc8a3e2..a48f9847 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -71,7 +71,7 @@ int do_write(int fd, int handle, void *buf, int offset, int size)
int main(int argc, char **argv)
{
int fd;
- struct drm_gem_alloc alloc;
+ struct drm_gem_create create;
uint8_t expected[OBJECT_SIZE];
uint8_t buf[OBJECT_SIZE];
int ret;
@@ -79,13 +79,13 @@ int main(int argc, char **argv)
fd = drm_open_any();
- memset(&alloc, 0, sizeof(alloc));
- alloc.size = OBJECT_SIZE;
- ret = ioctl(fd, DRM_IOCTL_GEM_ALLOC, &alloc);
+ memset(&create, 0, sizeof(create));
+ create.size = OBJECT_SIZE;
+ ret = ioctl(fd, DRM_IOCTL_GEM_CREATE, &create);
assert(ret == 0);
- handle = alloc.handle;
+ handle = create.handle;
- printf("Testing contents of newly allocated object.\n");
+ printf("Testing contents of newly created object.\n");
ret = do_read(fd, handle, buf, 0, OBJECT_SIZE);
assert(ret == 0);
memset(&expected, 0, sizeof(expected));