fix incorrect check in test

This commit is contained in:
Ronnie Sahlberg
2013-05-19 08:42:10 -07:00
parent 4df179bfd4
commit ec5855c6b2
2 changed files with 5 additions and 3 deletions

View File

@@ -2764,7 +2764,7 @@ int report_supported_opcodes(struct iscsi_context *iscsi, int lun, int rctd, int
struct scsi_task *task;
logging(LOG_VERBOSE, "Send REPORT_SUPPORTED_OPCODE RCTD:%d OPTIONS:%d "
"OPCODE:%d SA:%d ALLOC_LEN:%d",
"OPCODE:0x%02x SA:%d ALLOC_LEN:%d",
rctd, options, opcode, sa, alloc_len);
task = iscsi_report_supported_opcodes_sync(iscsi, lun,
@@ -2806,7 +2806,7 @@ int report_supported_opcodes_invalidfieldincdb(struct iscsi_context *iscsi, int
struct scsi_task *task;
logging(LOG_VERBOSE, "Send REPORT_SUPPORTED_OPCODE (expecting INVALID_FIELD_IN_CDB) RCTD:%d OPTIONS:%d "
"OPCODE:%d SA:%d ALLOC_LEN:%d",
"OPCODE:0x%02x SA:%d ALLOC_LEN:%d",
rctd, options, opcode, sa, alloc_len);
task = iscsi_report_supported_opcodes_sync(iscsi, lun,

View File

@@ -132,7 +132,7 @@ test_report_supported_opcodes_one_command(void)
logging(LOG_VERBOSE, "Verify CDB length is not 0");
CU_ASSERT_NOT_EQUAL(rsoc_one->cdb_length, 0);
if (rsoc_one->cdb_length != 0) {
if (rsoc_one->cdb_length == 0) {
logging(LOG_NORMAL, "[FAILED] CDB length is 0");
}
@@ -142,6 +142,8 @@ test_report_supported_opcodes_one_command(void)
logging(LOG_NORMAL, "[FAILED] CDB[0] Usage Data is "
"not 0xFF");
}
scsi_free_scsi_task(one_task);
}