tests: properly terminate tests when values mismatch

Not much use running them in the test rig otherwise.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2011-11-27 01:37:59 +01:00
parent 2f56e96177
commit 8c7f8bcccb
5 changed files with 15 additions and 5 deletions
+3 -1
View File
@@ -119,10 +119,12 @@ store_pipe_control_loop(void)
drm_intel_bo_map(target_bo, 1);
buf = target_bo->virtual;
if (buf[0] != val)
if (buf[0] != val) {
fprintf(stderr,
"value mismatch: cur 0x%08x, stored 0x%08x\n",
buf[0], val);
exit(-1);
}
buf[0] = 0; /* let batch write it again */
drm_intel_bo_unmap(target_bo);