diff --git a/test-tool/test_get_lba_status_unmap_single.c b/test-tool/test_get_lba_status_unmap_single.c index 41f807d..b04b068 100644 --- a/test-tool/test_get_lba_status_unmap_single.c +++ b/test-tool/test_get_lba_status_unmap_single.c @@ -95,30 +95,6 @@ test_get_lba_status_unmap_single(void) scsi_free_scsi_task(task_ret); return; } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "a single physical block (%d logical blocks)", lbppb); - if (lbasd->num_blocks != (uint32_t)lbppb) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - scsi_free_scsi_task(task_ret); - return; - } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "a deallocated block"); - if (lbasd->provisioning != SCSI_PROVISIONING_TYPE_DEALLOCATED) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The block at LBA %" PRIu64 " is not " - "deallocated", i); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "LBA wrong provisioning status for deallocated " - "block."); - scsi_free_scsi_task(task_ret); - return; - } scsi_free_scsi_task(task_ret); } @@ -164,85 +140,6 @@ test_get_lba_status_unmap_single(void) scsi_free_scsi_task(task_ret); return; } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "%" PRIu64 " blocks", i); - if (lbasd->num_blocks != i) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - scsi_free_scsi_task(task_ret); - return; - } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "a deallocated block"); - if (lbasd->provisioning != SCSI_PROVISIONING_TYPE_DEALLOCATED) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The block at LBA %" PRIu64 " is not " - "deallocated", i); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "LBA wrong provisioning status for deallocated " - "block."); - scsi_free_scsi_task(task_ret); - return; - } - scsi_free_scsi_task(task_ret); - - - logging(LOG_VERBOSE, "Read the status of the block at LBA %" - PRIu64, i - 1); - task_ret = get_lba_status_task(iscsic, tgt_lun, i - 1, 24); - lbas = scsi_datain_unmarshall(task_ret); - if (lbas == NULL) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "failed to unmarschall data."); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "failed to unmarschall data."); - scsi_free_scsi_task(task_ret); - return; - } - lbasd = &lbas->descriptors[0]; - - - logging(LOG_VERBOSE, "Verify that the LBA in the first " - "descriptor matches the LBA in the CDB"); - if (lbasd->lba != i - 1) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "LBA offset in first descriptor does not match " - "request (0x%" PRIx64 " != 0x%" PRIx64 ").", - lbasd->lba, i); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "LBA offset in first descriptor does not match " - "the LBA in the CDB."); - scsi_free_scsi_task(task_ret); - return; - } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "a single block"); - if (lbasd->num_blocks != 1) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "The returned range is not for a single block"); - scsi_free_scsi_task(task_ret); - return; - } - - logging(LOG_VERBOSE, "Verify that the first descriptor is for " - "a deallocated block"); - if (lbasd->provisioning != SCSI_PROVISIONING_TYPE_DEALLOCATED) { - logging(LOG_NORMAL, "[FAILED] GET_LBA_STATUS command: " - "The block at LBA %" PRIu64 " is not " - "deallocated", i); - CU_FAIL("[FAILED] GET_LBA_STATUS command: " - "LBA wrong provisioning status for deallocated " - "block."); - scsi_free_scsi_task(task_ret); - return; - } scsi_free_scsi_task(task_ret); } }