-
Notifications
You must be signed in to change notification settings - Fork 30
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
Checksum error checks fixes #215 #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the changes in detail, so I might have missed a few bits. Most important part is of course whether it fixes the issue. In any case I would clean up the code a bit which will make it easier to read. See my inline comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes introduced are not consistent in its use of tabs and spaces.
Before the changes the file used (mostly) spaces only.
The PR has accumulated quite a lot of commits, where some changes things already changed in earlier commits. The PR could benefit from rearranging/merging the commits into logical units (or even merging ito one single commit).
@spbooth : I have updated the PR after reviewing it. There are two changes that are not only white space corrections. Let me know if I have misunderstood the intentions of the PR. |
@msalle: Are you OK with the changes made? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
there is still one comment open from me, about the use of length
versus read_left
.
I think that needs to be resolved/checked before we can merge it in. I'm pretty sure my suggested change is the correct one. I think other than that it looks ok to me.
Can we merge this? |
@ellert What are your thoughts on my comment https://github.com/gridcf/gct/pull/216/files#r1290396767 |
I already gave a long reply to this in the discussion above. As far as I can see the code is correct as it is. |
Not sure where you mean? |
Here I quote my reply again. The check is supposed to check if the original value of Either The check When the When the |
Ah, I understand, thanks! |
The routine globus_l_gass_copy_cksm_file() in globus_gass_copy_glob.c has a file read loop: while ((n = read(fd, buf, count)) > 0) If an IO error occurs in the read call it will return -1 and the loop will terminate early generating an incorrect digest for the file but no error report until the subsequent file transfer fails its checksum test. On a related note if you check for errors properly you discover that a recursive globus-url-copy attempts to calculate checksums on directory-urls using this routine (which always generates a error in the read call).
Merging this now. Luckily no CI tests timed out on Travis this time. |
suggested fix for issue #215