SPC-2 RESERVE tests: Use MODE SENSE instead of TEST UNIT READY
Although SPC-2 specifies that a reservation conflict should be reported when TEST UNIT READY is received from another initiator than the registered initiator, it is an established practice that TEST UNIT READY is accepted in this case. Hence use the MODE SENSE command to test the effect of the RESERVE command instead of TEST UNIT READY. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
bb8d01e093
commit
b631a2146c
@@ -67,13 +67,13 @@ test_reserve6_2initiators(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
|
||||
logging(LOG_NORMAL, "Test we can still TESTUNITREADY from the first initiator");
|
||||
ret = testunitready(iscsic, tgt_lun);
|
||||
logging(LOG_NORMAL, "Test we can still send MODE SENSE from the first initiator");
|
||||
ret = mode_sense(iscsic, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
logging(LOG_NORMAL, "TESTUNITREADY should fail from the second initiator");
|
||||
ret = testunitready_conflict(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
logging(LOG_NORMAL, "MODE SENSE should fail from the second initiator");
|
||||
ret = mode_sense(iscsic2, tgt_lun);
|
||||
CU_ASSERT_EQUAL(ret, SCSI_STATUS_RESERVATION_CONFLICT);
|
||||
|
||||
|
||||
logging(LOG_NORMAL, "RESERVE6 from the second initiator should still fail");
|
||||
|
||||
Reference in New Issue
Block a user