TESTS: *protect field set to non-zero are only guaranteed to fail if the device does not support protection information
This commit is contained in:
@@ -39,15 +39,20 @@ test_read12_rdprotect(void)
|
||||
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
for (i = 1; i < 8; i++) {
|
||||
ret = read12_invalidfieldincdb(iscsic, tgt_lun, 0,
|
||||
if (inq->protect) {
|
||||
logging(LOG_VERBOSE, "No tests for devices that support protection information yet.");
|
||||
} else {
|
||||
logging(LOG_VERBOSE, "Device does not support protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
ret = read12_invalidfieldincdb(iscsic, tgt_lun, 0,
|
||||
block_size, block_size,
|
||||
i, 0, 0, 0, 0, NULL);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] READ12 is not implemented.");
|
||||
CU_PASS("READ12 is not implemented.");
|
||||
return;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] READ12 is not implemented.");
|
||||
CU_PASS("READ12 is not implemented.");
|
||||
return;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user