test_iscsi_datasn_invalid: Make terminology consistent with RFC 3720
According to RFC 3720 the data associated with a SCSI WRITE command is sent via Data-Out PDU's. Update log texts accordingly and also make the capitalization of DataSN consistent with RFC 3720. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
0763dc5743
commit
eee66727a7
@@ -35,19 +35,19 @@ static int my_iscsi_queue_pdu(struct iscsi_context *iscsi _U_, struct iscsi_pdu
|
||||
}
|
||||
switch (change_datasn) {
|
||||
case 1:
|
||||
/* change datasn to 0 */
|
||||
/* change DataSN to 0 */
|
||||
scsi_set_uint32(&pdu->outdata.data[36], 0);
|
||||
break;
|
||||
case 2:
|
||||
/* change datasn to 27 */
|
||||
/* change DataSN to 27 */
|
||||
scsi_set_uint32(&pdu->outdata.data[36], 27);
|
||||
break;
|
||||
case 3:
|
||||
/* change datasn to -1 */
|
||||
/* change DataSN to -1 */
|
||||
scsi_set_uint32(&pdu->outdata.data[36], -1);
|
||||
break;
|
||||
case 4:
|
||||
/* change datasn from (0,1) to (1,0) */
|
||||
/* change DataSN from (0,1) to (1,0) */
|
||||
datasn = scsi_get_uint32(&pdu->outdata.data[36]);
|
||||
scsi_set_uint32(&pdu->outdata.data[36], 1 - datasn);
|
||||
break;
|
||||
@@ -63,7 +63,7 @@ void test_iscsi_datasn_invalid(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test sending invalid iSCSI DATASN");
|
||||
logging(LOG_VERBOSE, "Test sending invalid iSCSI DataSN");
|
||||
|
||||
if (sd->iscsi_ctx == NULL) {
|
||||
const char *err = "[SKIPPED] This test is "
|
||||
@@ -73,7 +73,7 @@ void test_iscsi_datasn_invalid(void)
|
||||
return;
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Send 2 DATAIN with DATASN==0. Should fail.");
|
||||
logging(LOG_VERBOSE, "Send two Data-Out PDU's with DataSN==0. Should fail.");
|
||||
change_datasn = 1;
|
||||
|
||||
sd->iscsi_ctx->use_immediate_data = ISCSI_IMMEDIATE_DATA_NO;
|
||||
@@ -96,7 +96,7 @@ void test_iscsi_datasn_invalid(void)
|
||||
iscsi_set_noautoreconnect(sd->iscsi_ctx, 0);
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Send DATAIN with DATASN==27. Should fail");
|
||||
logging(LOG_VERBOSE, "Send Data-Out PDU with DataSN==27. Should fail");
|
||||
change_datasn = 2;
|
||||
|
||||
sd->iscsi_ctx->use_immediate_data = ISCSI_IMMEDIATE_DATA_NO;
|
||||
@@ -119,7 +119,7 @@ void test_iscsi_datasn_invalid(void)
|
||||
iscsi_set_noautoreconnect(sd->iscsi_ctx, 0);
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Send DATAIN with DATASN==-1. Should fail");
|
||||
logging(LOG_VERBOSE, "Send Data-Out PDU with DataSN==-1. Should fail");
|
||||
change_datasn = 3;
|
||||
|
||||
sd->iscsi_ctx->use_immediate_data = ISCSI_IMMEDIATE_DATA_NO;
|
||||
@@ -143,7 +143,7 @@ void test_iscsi_datasn_invalid(void)
|
||||
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Send DATAIN in reverse order (datasn == 1,0). Should fail");
|
||||
logging(LOG_VERBOSE, "Send Data-Out PDU's in reverse order (DataSN == 1,0). Should fail");
|
||||
change_datasn = 4;
|
||||
|
||||
sd->iscsi_ctx->use_immediate_data = ISCSI_IMMEDIATE_DATA_NO;
|
||||
|
||||
Reference in New Issue
Block a user