test-tool: fix GetLBAStatus.Simple exit

if GetLBAStatus fails immediately exit the test.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2014-08-13 17:58:32 +02:00
parent a2592bff3a
commit f3ce541463

View File

@@ -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;
}
}
}