errors testing mercurial-1.6.3

Martin Geisler mg at aragost.com
Fri Oct 1 03:30:20 CDT 2010


JohnT <jrt at worldlinc.net> writes:

>  Hello. I've been getting errors running mercurial versions built on
> my system. I've tried 1.1.2, 1.5.4 and 1.6.3. On asking in
> Freenode/mercurial, I was told how to run just the failed tests.

That could have been me :) If you've tested three versions of Mercurial
and get errors with all of them, then I think something is strange or
unusual with your system.

We don't ship Mercurial with known errors in the test suite -- we all
run the test suite whenever we accept a patch so I sometimes end up
running it several times a day.


> After running the full test suite, I got four errors or failures. On
> the first rerun, I got one error. On rerunning that, it happened
> again. I don't understand why errors would disappear on reruns (errors
> due to timeouts?) but here's the console log of the error that didn't
> disappear.

Some of the tests that involve third-party tools are not 100% stable.
The CVS conversion tests are particularly bad since CVS sometimes wont
notice a change we've made to a file in the test script. We fix those
errors as we discover them by inserting extra 'sleep 1' calls in the
tests scripts.

This is just an example of how test output can change from one run to
another, but your error is a genuine error.

> TEST RERUN
>
> ./run-tests.py -r
>
> ERROR:
> /home/dilbert/Download/mozilla/mercurial-1.6.3/tests/test-archive
> output changed
> --- /home/dilbert/Download/mozilla/mercurial-1.6.3/tests/test-archive.out
> +++ /home/dilbert/Download/mozilla/mercurial-1.6.3/tests/test-archive.err
> @@ -7,16 +7,28 @@
>  % tar.bz2 and zip disallowed should both give 403
>  403 Archive type not allowed: bz2
>  403 Archive type not allowed: zip
> +close failed in file object destructor:
> +Error in sys.excepthook:
> +
> +Original exception was:
>  % bz2 allowed should give 200
>  200 Script output follows
>  % zip and tar.gz disallowed should both give 403
>  403 Archive type not allowed: zip
>  403 Archive type not allowed: gz

I'm afraid I haven't seen this before. You could try editing
test-archive like this

diff --git a/tests/test-archive b/tests/test-archive
--- a/tests/test-archive
+++ b/tests/test-archive
@@ -17,7 +17,7 @@
 # check http return codes
 test_archtype() {
     echo "allow_archive = $1" >> .hg/hgrc
-    hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
+    hg --traceback serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
     cat hg.pid >> $DAEMON_PIDS
     echo % $1 allowed should give 200
     "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1

and see if it gives us more information. Then execute

  ./run-tests.py test-archive

to re-run just that particular test.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list