Skip to content
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

hashsum: Windows: check in binary mode by default and allow --binary/--text #6808

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

Pistonight
Copy link
Contributor

@Pistonight Pistonight commented Oct 21, 2024

On Windows, changed hashsum with --check to use the same behavior as without --check for selecting binary/text mode, i.e. allows --binary/--text flags and default to binary

Updated command line help message

Added binary test cases for hashsum. Using a PNG file since PNG header conveniently has 0x0D0A in it. Verified the new test cases would fail on Windows without this change

Closes #6805

@sylvestre
Copy link
Contributor

It is a lot of new files just for a small change. What about checking only one kind of checksum?

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/timeout/timeout is no longer failing!

@Pistonight
Copy link
Contributor Author

Won't hurt for adding a second test case for all types of sums right? Since right now the only test is hello, world? I can change it to just one type if you really want

@sylvestre
Copy link
Contributor

yeah, adding 29 files for a simple test like this one isn't ideal

@Pistonight
Copy link
Contributor Author

Updated to only check SHA256 scenarios

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/timeout/timeout is no longer failing!

@sylvestre
Copy link
Contributor

lgtm

@sylvestre sylvestre merged commit 0ef5b75 into uutils:main Oct 22, 2024
68 checks passed
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.

RFC: Impossible to verify checksum on Windows for any binary file that has the sequence \r\n
2 participants