On Tue, 24 Apr 2001, Sam TH wrote:
> > Every time a subcommand could potentially change something on
> > disk, we need to inspect the disk. Specifically, this means:
> > * user-data: we need to make sure the working copy has
> > exactly the tree-structure we expect, and each file has
> > exactly the contents we expect. We also need to look at
> > all user-specified properties.
> Question here: how do we want to compare file contents? I see two
> options -
> 1. Use cmp.cmp().
> + Exact comparison.
> - Can't be stored in the tree structure.
> - Potentially slow.
> 2. Use md5sums.
> + Faster.
> + Can be stored in tree.
> - Could be wrong.
> Personally, I prefer the latter, since it allows us to maintain my tree
> work. If people have strong feelings about the correcness issue, I would
> suggest using md5sums for most things, and then having seperate tests
> which use cmp() for extra accuracy.
Personally, I'd go for the first version. When speaking test scripts in
Not because the the correctness issue, as I belive md5 is correct enough, but
for being able to do 'diff file1 file2' (or possibly cmp when doing true
binary operations) to get a grip of what did get wrong and how it was
expected to look like.
With an md5 digest, all you know is that it is wrong, but not how wrong.
Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Sat Oct 21 14:36:29 2006