TESTS: Remove some READCAPACITY16 we no longer need
This commit is contained in:
@@ -24,7 +24,6 @@ int T0171_unmap_zero(const char *initiator, const char *url)
|
||||
{
|
||||
struct iscsi_context *iscsi;
|
||||
struct scsi_task *task;
|
||||
struct scsi_readcapacity16 *rc16;
|
||||
int ret, i, lun;
|
||||
|
||||
printf("0171_unmap_zero:\n");
|
||||
@@ -45,36 +44,12 @@ int T0171_unmap_zero(const char *initiator, const char *url)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* find the size of the LUN */
|
||||
task = iscsi_readcapacity16_sync(iscsi, lun);
|
||||
if (task == NULL) {
|
||||
printf("Failed to send readcapacity16 command: %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
goto finished;
|
||||
}
|
||||
if (task->status != SCSI_STATUS_GOOD) {
|
||||
printf("Readcapacity command: failed with sense. %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
scsi_free_scsi_task(task);
|
||||
goto finished;
|
||||
}
|
||||
rc16 = scsi_datain_unmarshall(task);
|
||||
if (rc16 == NULL) {
|
||||
printf("failed to unmarshall readcapacity16 data. %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
scsi_free_scsi_task(task);
|
||||
goto finished;
|
||||
}
|
||||
|
||||
if (rc16->lbpme == 0){
|
||||
if (lbpme == 0){
|
||||
printf("Logical unit is fully provisioned. Skipping test\n");
|
||||
ret = -2;
|
||||
scsi_free_scsi_task(task);
|
||||
goto finished;
|
||||
}
|
||||
|
||||
scsi_free_scsi_task(task);
|
||||
|
||||
if (!data_loss) {
|
||||
printf("data_loss flag is not set. Skipping test\n");
|
||||
ret = -2;
|
||||
|
||||
Reference in New Issue
Block a user