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

test.sh failing due to an incorrect MD5 checksum. #317

Open
fabionatali opened this issue Aug 20, 2023 · 3 comments
Open

test.sh failing due to an incorrect MD5 checksum. #317

fabionatali opened this issue Aug 20, 2023 · 3 comments

Comments

@fabionatali
Copy link

fabionatali commented Aug 20, 2023

Hi,

Thanks for creating Duc.

I've been trying to run the test.sh test suite that comes with Duc but I seem to be getting the following error:

$ ./test.sh
report: ok
md5sum: failed
expected: 
33e2be27a9e70e81d4006a2d7b555948  /tmp/duc-test.out
got: 
38ab7b7d1ec6ac57d672c5618371386d  /tmp/duc-test.out

This seems to be due to the --check-hard-links option and the way hard links are handled under different operating systems. Launching test.sh across different OSes, I noticed that duc-test.out may report one of the following three snippets, where one, two, and three are hard links that all link to the same file.

  9.8K  ├─ hard-link
  9.8K  │   ╰─ one
  9.8K  ├─ hard-link
  9.8K  │   ╰─ two
  9.8K  ├─ hard-link
  9.8K  │   ╰─ three

In turn, the generated duc-test.out file may have checksum, respectively,

  • 78dbf880ef6917ea665fddb5ebb44428,
  • 38ab7b7d1ec6ac57d672c5618371386d,
  • 33e2be27a9e70e81d4006a2d7b555948.

Crucially, only the first checksum is accepted as valid by test.sh, the other two are reported as failures.

My understanding is that these may be all correct outcomes and that we should only be testing for the number of files reported - not for which particular one gets reported? I'm glad to send a tiny patch for this - but would be glad to get my intuition validated first.

Thanks, Fabio.

@l8gravely
Copy link
Collaborator

l8gravely commented Aug 29, 2023 via email

@fabionatali
Copy link
Author

Hey @l8gravely, thanks for getting back to me. I had a go at it with #318 - hope it's ok.

@fabionatali
Copy link
Author

@l8gravely, sorry, quick follow up and low-priority request. If #318 looks alright and ends up being merged, would you consider creating a new git tag for it? That would make things marginally cleaner when it comes to packaging duc under my OS distribution. Thanks, best, Fabio.

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

No branches or pull requests

2 participants