Repository navigation
checksum: warn about unreadable files before mismatches in --check - #17022
ChihweiLHBird wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
ci seems broken |
c805d5c to
f2bf7d9
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
I just rebased, and let's see if it's fixed now |
|
GNU testsuite comparison: |
With both a file that cannot be read and a digest mismatch, --check printed the two summary warnings in the opposite order to GNU. Print the warning about unreadable files first. Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
f2bf7d9 to
de47f0c
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
1 open issue
Review effort: Lite
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
1 open issue
1 resolved since last review
Review effort: Lite
| d41d8cd98f00b204e9800998ecf8427e missing\n", | ||
| ) | ||
| .fails_with_code(1) | ||
| .stdout_is("f: FAILED\nmissing: FAILED open or read\n") | ||
| .stderr_is( | ||
| "cksum: missing: No such file or directory\n\ | ||
| cksum: WARNING: 1 listed file could not be read\n\ | ||
| cksum: WARNING: 1 computed checksum did NOT match\n", |


Summary
When a checksum list has both a file that cannot be read and a digest that does not match,
--checkprinted the two summary warnings in the opposite order to GNU. Print the warning about unreadable files first. This applies tocksum,md5sum,sha*sumandb2sum.Only the order of these two lines changes. The other output and the exit status stay the same.
Example
sumshas a wrong digest fora, and it names a filemissingthat does not exist.Before:
After, same as GNU:
The exit status is 1 before and after.