From f3ce5414639c6553ba763ef69320f728cf9e23da Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Wed, 13 Aug 2014 17:58:32 +0200 Subject: [PATCH] test-tool: fix GetLBAStatus.Simple exit if GetLBAStatus fails immediately exit the test. Signed-off-by: Peter Lieven --- test-tool/test_get_lba_status_simple.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test-tool/test_get_lba_status_simple.c b/test-tool/test_get_lba_status_simple.c index 3bd9529..52b0f97 100644 --- a/test-tool/test_get_lba_status_simple.c +++ b/test-tool/test_get_lba_status_simple.c @@ -38,13 +38,19 @@ test_get_lba_status_simple(void) CU_PASS("[SKIPPED] Target does not support GET_LBA_STATUS. Skipping test"); return; } - CU_ASSERT_EQUAL(ret, 0); + if (ret != 0) { + CU_FAIL("[FAILED] GET_LBA_STATUS command failed"); + return; + } } logging(LOG_VERBOSE, "Test GET_LBA_STATUS of 1-256 blocks at the end of the LUN"); for (i = 1; i <= 256; i++) { ret = get_lba_status(iscsic, tgt_lun, num_blocks - i, 24, NULL); - CU_ASSERT_EQUAL(ret, 0); + if (ret != 0) { + CU_FAIL("[FAILED] GET_LBA_STATUS command failed"); + return; + } } }