mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 13:23:02 +00:00
tests: Use igt macros more
Often just folding together of the common if (cond) printf; abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out more since the igt macros will already print the condition and errno. A few tests where more work (like ripping out return codes en masse) is needed left as-is. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -85,12 +85,10 @@ check_bo(struct intel_batchbuffer *batch, struct igt_buf *buf, uint32_t val)
|
||||
ptr = data;
|
||||
}
|
||||
for (i = 0; i < WIDTH*HEIGHT; i++) {
|
||||
if (ptr[i] != val) {
|
||||
fprintf(stderr, "Expected 0x%08x, found 0x%08x "
|
||||
"at offset 0x%08x\n",
|
||||
val, ptr[i], i * 4);
|
||||
abort();
|
||||
}
|
||||
igt_assert_f(ptr[i] == val,
|
||||
"Expected 0x%08x, found 0x%08x "
|
||||
"at offset 0x%08x\n",
|
||||
val, ptr[i], i * 4);
|
||||
val++;
|
||||
}
|
||||
if (ptr != data)
|
||||
@@ -115,10 +113,7 @@ int main(int argc, char **argv)
|
||||
devid = intel_get_drm_devid(fd);
|
||||
|
||||
render_copy = igt_get_render_copyfunc(devid);
|
||||
if (render_copy == NULL) {
|
||||
printf("no render-copy function, doing nothing\n");
|
||||
return 77;
|
||||
}
|
||||
igt_require(render_copy);
|
||||
|
||||
snoop = 1;
|
||||
if (IS_GEN2(devid)) /* chipset only handles cached -> uncached */
|
||||
|
||||
Reference in New Issue
Block a user