mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 14:23:03 +00:00
tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <errno.h>
|
||||
@@ -268,11 +267,11 @@ render_copy(int fd,
|
||||
if ((b - batch) & 1)
|
||||
*b++ = 0;
|
||||
|
||||
assert(b - batch <= 1024);
|
||||
igt_assert(b - batch <= 1024);
|
||||
handle = gem_create(fd, 4096);
|
||||
gem_write(fd, handle, 0, batch, (b-batch)*sizeof(batch[0]));
|
||||
|
||||
assert(r-reloc == 2);
|
||||
igt_assert(r-reloc == 2);
|
||||
|
||||
tiling_bits = 0;
|
||||
if (use_fence)
|
||||
@@ -320,7 +319,7 @@ render_copy(int fd,
|
||||
drmCommandNone(fd, DRM_I915_GEM_THROTTLE);
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec);
|
||||
}
|
||||
assert(ret == 0);
|
||||
igt_assert(ret == 0);
|
||||
|
||||
gem_close(fd, handle);
|
||||
}
|
||||
@@ -350,11 +349,11 @@ static void blt_copy(int fd, uint32_t dst, uint32_t src)
|
||||
if ((b - batch) & 1)
|
||||
*b++ = 0;
|
||||
|
||||
assert(b - batch <= 1024);
|
||||
igt_assert(b - batch <= 1024);
|
||||
handle = gem_create(fd, 4096);
|
||||
gem_write(fd, handle, 0, batch, (b-batch)*sizeof(batch[0]));
|
||||
|
||||
assert(r-reloc == 2);
|
||||
igt_assert(r-reloc == 2);
|
||||
|
||||
obj[0].handle = dst;
|
||||
obj[0].relocation_count = 0;
|
||||
@@ -398,7 +397,7 @@ static void blt_copy(int fd, uint32_t dst, uint32_t src)
|
||||
drmCommandNone(fd, DRM_I915_GEM_THROTTLE);
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec);
|
||||
}
|
||||
assert(ret == 0);
|
||||
igt_assert(ret == 0);
|
||||
|
||||
gem_close(fd, handle);
|
||||
}
|
||||
@@ -432,7 +431,7 @@ create_bo(int fd, uint32_t val, int tiling)
|
||||
|
||||
/* Fill the BO with dwords starting at val */
|
||||
v = gem_mmap(fd, handle, WIDTH*HEIGHT*4, PROT_READ | PROT_WRITE);
|
||||
assert(v);
|
||||
igt_assert(v);
|
||||
for (i = 0; i < WIDTH*HEIGHT; i++)
|
||||
v[i] = val++;
|
||||
munmap(v, WIDTH*HEIGHT*4);
|
||||
@@ -447,7 +446,7 @@ check_bo(int fd, uint32_t handle, uint32_t val)
|
||||
int i;
|
||||
|
||||
v = gem_mmap(fd, handle, WIDTH*HEIGHT*4, PROT_READ);
|
||||
assert(v);
|
||||
igt_assert(v);
|
||||
for (i = 0; i < WIDTH*HEIGHT; i++) {
|
||||
if (v[i] != val) {
|
||||
fprintf(stderr, "Expected 0x%08x, found 0x%08x "
|
||||
|
||||
Reference in New Issue
Block a user