-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: rework for improving checkum checking GNU behavior match #6654
Conversation
I'm aware that this PR is consequent and that the rewrite is complex and difficult to review. That's why I tried to make meaningful commits so its easier to go step by step. I'm also considering to split this PR into several smaller ones, but I'm not sure where to split. |
50c7ca5
to
a9a3706
Compare
8a191be
to
1d56096
Compare
GNU testsuite comparison:
|
1d56096
to
95b6cb1
Compare
GNU testsuite comparison:
|
length: Option<usize>, | ||
} | ||
|
||
impl ChecksumAlgoBuilder { |
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.
please add a rustdoc comment here
63362c5
to
86fe708
Compare
GNU testsuite comparison:
|
86fe708
to
493280e
Compare
GNU testsuite comparison:
|
493280e
to
a5e11b4
Compare
GNU testsuite comparison:
|
1d6dbc4
to
0c8729d
Compare
I've finally managed to fix #6572, which needed a consequent rewrite of the logic. But hey, at least it works :) |
0c8729d
to
b4b5252
Compare
changes: lint fixes + windows code error (as usual :') |
b4b5252
to
032ab96
Compare
032ab96
to
3e2f330
Compare
it is still marked as draft, is it ready to be reviewed? |
3e2f330
to
10e4ba8
Compare
GNU testsuite comparison:
|
10e4ba8
to
744774e
Compare
test(cksum): add test for blake length gessing test(cksum): add test for hexa/base64 confusion test(cksum): add test for error handling on incorrectly formatted checksum test(cksum): add test for trailing spaces making a line improperly formatted test(cksum): Re-implement GNU test 'cksum-base64' in the testsuite
744774e
to
f5f6d6c
Compare
@RenjiSann it has been merged in other PR, right ? |
Right, we can close this |
thanks :) |
This PR makes a significant refactor of the checksum checking code.
The current architecture prevents us to fix #6572, #6614 and #6653.
For #6614, we will need to implement a "retry" step in case we matched the hexa regex and we wish to try again considering the checksum as base64.
The refactor mainly consists in decomposing and extracting functionalities, and improving error management.
It adds several tests, for #6653 and #6572.
Its merge is gated by #6603, as it depends on its commits.