summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-19 16:37:07 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-19 19:40:32 +0200
commite5cdd62624342180a16630b4f6b1d604f6e6e581 (patch)
tree71edb7e9e1853e4c3edcc22d16c066c0d5609a61 /tests
parentb3525129535c6e8e3588f63960e2296d598f6e9a (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_storedw_batches_loop.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index c9058d5f..ce5ee556 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -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);