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:
@@ -38,13 +38,19 @@ test_get_lba_status_simple(void)
|
|||||||
CU_PASS("[SKIPPED] Target does not support GET_LBA_STATUS. Skipping test");
|
CU_PASS("[SKIPPED] Target does not support GET_LBA_STATUS. Skipping test");
|
||||||
return;
|
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");
|
logging(LOG_VERBOSE, "Test GET_LBA_STATUS of 1-256 blocks at the end of the LUN");
|
||||||
for (i = 1; i <= 256; i++) {
|
for (i = 1; i <= 256; i++) {
|
||||||
ret = get_lba_status(iscsic, tgt_lun, num_blocks - i, 24, NULL);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user