On Wed, Apr 25, 2001 at 07:52:34AM +0200, Daniel Stenberg wrote:
> 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.
I'm not sure we're talking about the same thing. I'm suggesting that
when running automated tests, we use md5sums. This process is only
going to produce binary info anyway, PASS or FAIL. Using diff to
figure out what went wrong would certainly be possible afterwords. It
might even be possible to do this once you detect a failure. But I'm
suggesting that failure detection be done with md5sums, not cmp.
sam th --- sam_at_uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
Received on Sat Oct 21 14:36:29 2006
- application/pgp-signature attachment: stored