Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using iSCSI URL test_inquiry_alloc is failing. #285

Open
sssharma10 opened this issue Jan 21, 2019 · 0 comments
Open

using iSCSI URL test_inquiry_alloc is failing. #285

sssharma10 opened this issue Jan 21, 2019 · 0 comments

Comments

@sssharma10
Copy link
Contributor

test case checking for getting same inquiry data from SCSI server is failing for iSCSI url path.
In case if I pass device directly with same setup test case is passing but when run test suite with iSCSI URL it is failing.
We are not recalculating datain size if we got residual data.
Attaching patch can you verify it also I have not tested its impact on other test cases.
diff --git a/lib/iscsi-command.c b/lib/iscsi-command.c
index 8b6859a..fc94983 100644
--- a/lib/iscsi-command.c
+++ b/lib/iscsi-command.c
@@ -405,6 +405,9 @@ iscsi_process_scsi_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
return -1;
}
task->residual = scsi_get_uint32(&in->hdr[44]);

  •    if (task->xfer_dir == SCSI_XFER_READ) {
    
  •        task->datain.size -= task->residual;
    
  •    }
              if (flags & ISCSI_PDU_DATA_RESIDUAL_UNDERFLOW) {
                      task->residual_status = SCSI_RESIDUAL_UNDERFLOW;
              } else {
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant