On Tue, Sep 3, 2013 at 7:57 PM, Aaron M. Ucko <u...@debian.org> wrote: > David Kalnischkies <kalnischkies+deb...@gmail.com> writes: > >> "d41d8cd98f00b204e9800998ecf8427e" is the md5 of an empty file. >> "89f331147b07a354262948559d430f0b" is the md5 of our test file. >> So the code calculates the right md5, but the expectation is wrong. > > AFAICT, the d41... value comes from a second pass through the file after > determining its length and seeking back to the start. (Your equals > macro prints its arguments in reverse order on failure.)
Right. Hello elephant. (WTF? reversing order…) > when not pulling anything into their buffers. I'd suggest reworking it > to use plain file descriptors throughout. I don't have much time at the moment, but I guess the attached patch should do this in the simplest/laziest way we have available. It would be nice if you could test it, though. Best regards David Kalnischkies
0001-use-FileFd-in-HashSum-test-to-unbreak-non-linux-port.patch
Description: Binary data