Add a test for mandatory opcodes for SBC devices.
Note that Read16/Readcapacity16 are mandatory on SBC3 but not prior. Not all mandatory opcodes are tested for yet.
This commit is contained in:
@@ -89,7 +89,16 @@ test_nomedia_sbc(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test READCAPACITY16 when medium is ejected.");
|
||||
ret = readcapacity16_nomedium(iscsic, tgt_lun, 15);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
if (ret == -2) {
|
||||
if (sbc3_support) {
|
||||
logging(LOG_NORMAL, "[FAILED] READCAPACITY16 is not available but the device claims SBC-3 support.");
|
||||
CU_FAIL("READCAPACITY16 failed but the device claims SBC-3 support.");
|
||||
} else {
|
||||
logging(LOG_NORMAL, "[SKIPPED] READCAPACITY16 is not implemented on this target and it does not claim SBC-3 support.");
|
||||
}
|
||||
} else {
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test GET_LBA_STATUS when medium is ejected.");
|
||||
ret = get_lba_status_nomedium(iscsic, tgt_lun, 0, 24);
|
||||
|
||||
Reference in New Issue
Block a user