Testing and lock noise stipple.
John Arbash Meinel
john at arbash-meinel.com
Tue May 5 15:28:38 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
>
> A bit of feedback:
>
> 1 - the actual noise is *really* too much (may the message ought
> to be displayed only when running with -Dlock ?). Granted,
> the attached patch makes it worse :)
You also forgot to request a [MERGE] for the attachment.
...
> If you look at the patch *in context*
> test_42_confirm_broken_manually gives a strange feeling of
> artificial cleanup.
>
> I couldn't find a good way to address the 3 remaining failures
> without violating the test spirit, feedback welcome.
>
So in all cases, at the time the *test* is made, the locks probably need
to be unbalanced. But at the time the test is *cleaned up* the locks
could be properly balanced again.
> test_break_lock: leaves the lock/unlock unbalanced on purpose
It leaves it unbalanced at the time of 'ld2.break_lock()'. And the
ld1.unlock() raises an exception because the lock was broken. I would
say that
1) break_lock() might hint to the other lock that it is now balanced.
2) Add a 'ld1._rebalance_unlock()' sort of function that is used by the
test suite under these conditions, to let the locking internals know
that things are actually balanced again.
>
> test_unlock_after_break_raises: requires that lock/unlock are unbalanced
This is pretty much the identical test to 'test_break_lock' only using
ld.force_break(ld.peek()) instead of ld.break_lock().
>
> test_43_break: makes it impossible to balance the lock/unlock by design
>
This one is a bit more tricky, because we intentionally delete the lock
object before we would have a chance to rebalance it. However, I don't
think the test spirit actually requires that. It is really just testing
that after breaking a lock, we can then obtain a new lock.
> I didn't look at the 70 remaining failures yet so the 3 above may
> be pathological.
>
> Vincent
I guess my argument is for some sort of LockObject._noop_unlock()...
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoATRYACgkQJdeBCYSNAAPxtwCfWYqd+aPb0HPXaciu81dfo6Mb
R5UAn27LyypN5thX9d6YIaigLmOVHzSr
=98Ho
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list