diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c index ea13202..31799ec 100644 --- a/test-tool/iscsi-support.c +++ b/test-tool/iscsi-support.c @@ -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, diff --git a/test-tool/test_report_supported_opcodes_one_command.c b/test-tool/test_report_supported_opcodes_one_command.c index be4b40b..46318b7 100644 --- a/test-tool/test_report_supported_opcodes_one_command.c +++ b/test-tool/test_report_supported_opcodes_one_command.c @@ -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); }