I look into iSCSI.iSCSIResiduals.WriteVerify10Residuals test with Linux TCM target. And there is we have the following errors:
1. test_writeverify10_residuals.c:134 - CU_ASSERT_EQUAL(task->status,SCSI_STATUS_GOOD)
2. test_writeverify10_residuals.c:227 - CU_ASSERT_EQUAL(task->status,SCSI_STATUS_GOOD)
3. test_writeverify10_residuals.c:281 - CU_ASSERT_EQUAL(task->status,SCSI_STATUS_GOOD)
4. test_writeverify10_residuals.c:308 - CU_FAIL("Block was not written correctly")
5. test_writeverify10_residuals.c:354 - CU_ASSERT_EQUAL(task->status,SCSI_STATUS_GOOD)
6. test_writeverify10_residuals.c:381 - CU_FAIL("Block was not written correctly") Send PRIN/READ_KEYS
Why do we expect to receive the SCSI_STATUS_GOOD status for WriteVerify request if the iSCSI(PDU)->ExpectedDataTransferLength != CDB->TransferLength?
I have explored iSCSI RFC (RFC 3720, section 10.3) and SAM3 (4.6 The service delivery subsystem), but did not find the exact answer to what to do in this case (iSCSI(PDU)->ExpectedDataTransferLength != CDB->TransferLength). The Linux rejects such requests: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/target/target_core_transport.c?h=v5.16.11#n1389
Is it correct to check the answer in the WriteVerify test like here: https://github.com/sahlberg/libiscsi/blob/master/test-tool/test_writeverify10_residuals.c#L173 ?
ok = task->status == SCSI_STATUS_GOOD ||
(task->status == SCSI_STATUS_CHECK_CONDITION &&
task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST &&
task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_FIELD_IN_INFORMATION_UNIT);
CU_ASSERT(ok);
I look into iSCSI.iSCSIResiduals.WriteVerify10Residuals test with Linux TCM target. And there is we have the following errors:
Why do we expect to receive the SCSI_STATUS_GOOD status for WriteVerify request if the iSCSI(PDU)->ExpectedDataTransferLength != CDB->TransferLength?
I have explored iSCSI RFC (RFC 3720, section 10.3) and SAM3 (4.6 The service delivery subsystem), but did not find the exact answer to what to do in this case (iSCSI(PDU)->ExpectedDataTransferLength != CDB->TransferLength). The Linux rejects such requests: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/target/target_core_transport.c?h=v5.16.11#n1389
Is it correct to check the answer in the WriteVerify test like here: https://github.com/sahlberg/libiscsi/blob/master/test-tool/test_writeverify10_residuals.c#L173 ?