From bb8d01e093ffd1eca2458a64a9d965f874a6d1cf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 16 Jul 2014 15:18:16 +0200 Subject: [PATCH] test_compareandwrite_simple: Make error messages more verbose Signed-off-by: Bart Van Assche --- test-tool/test_compareandwrite_simple.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test-tool/test_compareandwrite_simple.c b/test-tool/test_compareandwrite_simple.c index 71a87cb..7e8b4c7 100644 --- a/test-tool/test_compareandwrite_simple.c +++ b/test-tool/test_compareandwrite_simple.c @@ -104,7 +104,8 @@ test_compareandwrite_simple(void) for (j = 0; j < i * block_size; j++) { if (buf[j] != 'B') { logging(LOG_VERBOSE, "[FAILED] Data did not " - "read back as 'B'"); + "read back as 'B' (buf[%d] = %#02x)", + j, buf[j]); CU_FAIL("Block was not written correctly"); return; } @@ -156,7 +157,8 @@ test_compareandwrite_simple(void) for (j = 0; j < i * block_size; j++) { if (buf[j] != 'B') { logging(LOG_VERBOSE, "[FAILED] Data did not " - "read back as 'B'"); + "read back as 'B' (buf[%d] = %#02x)", + j, buf[j]); CU_FAIL("Block was not written correctly"); return; }