Skip to content

Conversation

@RenjiSann
Copy link
Collaborator

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.

@RenjiSann
Copy link
Collaborator Author

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.

@RenjiSann RenjiSann force-pushed the cksum-rework-bis branch 2 times, most recently from 8a191be to 1d56096 Compare August 26, 2024 13:17
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

length: Option<usize>,
}

impl ChecksumAlgoBuilder {
Copy link
Contributor

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

@RenjiSann RenjiSann force-pushed the cksum-rework-bis branch 4 times, most recently from 63362c5 to 86fe708 Compare August 30, 2024 09:59
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-base64. tests/cksum/cksum-base64 is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-base64. tests/cksum/cksum-base64 is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-base64. tests/cksum/cksum-base64 is passing on 'main'. Maybe you have to rebase?

@RenjiSann RenjiSann force-pushed the cksum-rework-bis branch 2 times, most recently from 1d6dbc4 to 0c8729d Compare August 31, 2024 23:45
@RenjiSann
Copy link
Collaborator Author

I've finally managed to fix #6572, which needed a consequent rewrite of the logic.
It still misses stuff like proper documentation, and proper refactoring for it to be maintainable.
It might take me some times to to it, as I won't be available that much in the coming weeks.

But hey, at least it works :)

@RenjiSann
Copy link
Collaborator Author

changes: lint fixes + windows code error (as usual :')

@sylvestre
Copy link
Contributor

it is still marked as draft, is it ready to be reviewed?

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mv/mv-n is no longer failing!
Congrats! The gnu test tests/mv/update is no longer failing!

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
@sylvestre
Copy link
Contributor

@RenjiSann it has been merged in other PR, right ?
thanks

@RenjiSann
Copy link
Collaborator Author

@RenjiSann it has been merged in other PR, right ?

Right, we can close this

@RenjiSann RenjiSann closed this Dec 2, 2024
@sylvestre
Copy link
Contributor

thanks :)

@RenjiSann RenjiSann deleted the cksum-rework-bis branch January 29, 2025 15:22
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

Successfully merging this pull request may close these issues.

cksum: gets confused by base64 that happens to consist entirely of hexadecimal digits

2 participants