summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-27 11:32:47 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-27 11:33:24 +0000
commit74f6e413d3cba0e95d1233c71e119ff50cd406d2 (patch)
treebcd0c74abf41c8abf4b35121fa7b41237666633e /tests
parent43a086269795c5b41bdab0dc2c456be0de97e762 (diff)
gem_fence_thrash: Fix array allocation size for LP64 systems
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_fence_thrash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 373c4d0b..3fc72a11 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -72,6 +72,7 @@ bo_create (int fd, int tiling)
gem_set_tiling(fd, handle, tiling, 1024);
ptr = gem_mmap(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
+ assert(ptr);
/* XXX: mmap_gtt pulls the bo into the GTT read domain. */
gem_sync(fd, handle);
@@ -111,11 +112,11 @@ _bo_write_verify(struct test *t)
assert (t->tiling >= 0 && t->tiling <= I915_TILING_Y);
assert (t->num_surfaces > 0);
- s = calloc(sizeof(**s), t->num_surfaces);
+ s = calloc(sizeof(*s), t->num_surfaces);
+ assert(s);
- for (k = 0; k < t->num_surfaces; k++) {
+ for (k = 0; k < t->num_surfaces; k++)
s[k] = bo_create(fd, t->tiling);
- }
for (k = 0; k < t->num_surfaces; k++) {
volatile uint32_t *a = s[k];