mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 13:52:54 +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:
@@ -88,13 +88,10 @@ verify_large_read(drm_intel_bo *bo, uint32_t val)
|
||||
drm_intel_bo_get_subdata(bo, 0, size, buf);
|
||||
|
||||
for (i = 0; i < size / 4; i++) {
|
||||
if (buf[i] != val) {
|
||||
fprintf(stderr,
|
||||
"Unexpected value 0x%08x instead of "
|
||||
"0x%08x at offset 0x%08x (%p)\n",
|
||||
buf[i], val, i * 4, buf);
|
||||
abort();
|
||||
}
|
||||
igt_assert_f(buf[i] == val,
|
||||
"Unexpected value 0x%08x instead of "
|
||||
"0x%08x at offset 0x%08x (%p)\n",
|
||||
buf[i], val, i * 4, buf);
|
||||
val++;
|
||||
}
|
||||
}
|
||||
@@ -113,13 +110,10 @@ verify_small_read(drm_intel_bo *bo, uint32_t val)
|
||||
drm_intel_bo_get_subdata(bo, offset, PAGE_SIZE, buf);
|
||||
|
||||
for (i = 0; i < PAGE_SIZE; i += 4) {
|
||||
if (buf[i / 4] != val) {
|
||||
fprintf(stderr,
|
||||
"Unexpected value 0x%08x instead of "
|
||||
"0x%08x at offset 0x%08x\n",
|
||||
buf[i / 4], val, i * 4);
|
||||
abort();
|
||||
}
|
||||
igt_assert_f(buf[i / 4] == val,
|
||||
"Unexpected value 0x%08x instead of "
|
||||
"0x%08x at offset 0x%08x\n",
|
||||
buf[i / 4], val, i * 4);
|
||||
val++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user