lib/drmtest: igt_assert|require with format strings

v2: Add a comment about the pitfalls around va_list handling.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-09-19 16:37:07 +02:00
parent b352512953
commit e5cdd62624
3 changed files with 69 additions and 19 deletions
+4 -6
View File
@@ -103,12 +103,10 @@ store_dword_loop(int divider, unsigned flags)
drm_intel_bo_map(target_bo, 1);
buf = target_bo->virtual;
if (buf[0] != (0x42000000 | val)) {
fprintf(stderr,
"value mismatch: cur 0x%08x, stored 0x%08x\n",
buf[0], 0x42000000 | val);
igt_fail(-1);
}
igt_assert_f(buf[0] != (0x42000000 | val),
"value mismatch: cur 0x%08x, stored 0x%08x\n",
buf[0], 0x42000000 | val);
buf[0] = 0; /* let batch write it again */
drm_intel_bo_unmap(target_bo);