coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

checksum: rework for improving checkum checking GNU behavior match

Open RenjiSann opened this issue 1 year ago • 10 comments

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 avatar Aug 17 '24 20:08 RenjiSann

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 avatar Aug 17 '24 20:08 RenjiSann

GNU testsuite comparison:

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

github-actions[bot] avatar Aug 26 '24 13:08 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Aug 28 '24 16:08 github-actions[bot]

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[bot] avatar Aug 30 '24 10:08 github-actions[bot]

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[bot] avatar Aug 30 '24 11:08 github-actions[bot]

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[bot] avatar Aug 31 '24 18:08 github-actions[bot]

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 avatar Aug 31 '24 23:08 RenjiSann

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

RenjiSann avatar Aug 31 '24 23:08 RenjiSann

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

sylvestre avatar Sep 08 '24 07:09 sylvestre

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!

github-actions[bot] avatar Sep 14 '24 08:09 github-actions[bot]

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

sylvestre avatar Dec 02 '24 09:12 sylvestre

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

Right, we can close this

RenjiSann avatar Dec 02 '24 09:12 RenjiSann

thanks :)

sylvestre avatar Dec 02 '24 09:12 sylvestre