Different (but valid) output in the testsuite

Matt Mackall mpm at selenic.com
Mon Mar 12 14:32:36 CDT 2012


On Sat, 2012-03-10 at 16:17 +0000, Javi Merino wrote:
> Hi,
> 
> The output of some tests in mercurial's testsuite can be different to
> what the test expect because of different versions of tools, weird
> kernels or slow architectures, but still be valid.  Some examples I've
> come across:
> 
> 1.  With git 1.7.9.1, test-subrepo-git.t fails with:
> 
> --- /home/javi/src/mercurial/mercurial/mercurial-2.1.1/tests/test-subrepo-git.t
> +++ /home/javi/src/mercurial/mercurial/mercurial-2.1.1/tests/test-subrepo-git.t.err
> @@ -482,7 +482,17 @@
>  
>  Sticky repository, update --clean
>    $ hg update --clean tip
> -  Previous HEAD position was aa84837... f
> +  Warning: you are leaving 2 commits behind, not connected to
> +  any of your branches:

We can direct that to /dev/null.

> --- /build/buildd-mercurial_2.1.1-2-armel-Sg28tg/mercurial-2.1.1/tests/test-pull-pull-corruption.t
> +++ /build/buildd-mercurial_2.1.1-2-armel-Sg28tg/mercurial-2.1.1/tests/test-pull-pull-corruption.t.err
> @@ -42,9 +42,9 @@
>  ... and start another pull before the first one has finished
>  
>    $ sleep 1
> +  $ hg pull ../source2 2>/dev/null
>    pulling from ../source1
>    requesting all changes
> -  $ hg pull ../source2 2>/dev/null
>    pulling from ../source2
>    adding changesets
>    adding manifests

The test test-pending.t illustrates a technique to avoid these races
with a signal file.

> ERROR: /build/buildd-mercurial_2.1.1-2-mipsel-ZKdaeu/mercurial-2.1.1/tests/test-hup.t output changed
> ---
> https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=mipsel&ver=2.1.1-2&stamp=1331272650
> 
> 3. With the Hurd kernel, some error messages are slightly different:
> 
> --- /build/buildd-mercurial_2.1.1-2-hurd-i386-nljf5k/mercurial-2.1.1/tests/test-acl.t
> +++ /build/buildd-mercurial_2.1.1-2-hurd-i386-nljf5k/mercurial-2.1.1/tests/test-acl.t.err
> @@ -868,7 +868,7 @@
>    added 3 changesets with 3 changes to 3 files
>    calling hook pretxnchangegroup.acl: hgext.acl.hook
>    acl: checking access for user "barney"
> -  error: pretxnchangegroup.acl hook raised an exception: [Errno 2] *: '../acl.config' (glob)
> +  error: pretxnchangegroup.acl hook raised an exception: [Errno 1073741826] No such file or directory: '../acl.config'

As if the world needed another reason to ignore Hurd. This is a
traditional 0-based errno with a random high bit set, apparently so you
can run different kernels on top of your microkernel. But why Posix
userspace would ever care about errors from a non-Posix kernel layer is
beyond me: all native errors should just be translated into the POSIX
space. This should probably be fixed in Python or libc actually.

Hell, even on Windows, ENOENT=2.

> --- /build/buildd-mercurial_2.1.1-2-hurd-i386-nljf5k/mercurial-2.1.1/tests/test-bad-pull.t
> +++ /build/buildd-mercurial_2.1.1-2-hurd-i386-nljf5k/mercurial-2.1.1/tests/test-bad-pull.t.err
> @@ -1,7 +1,7 @@
>    $ "$TESTDIR/hghave" serve || exit 80
>  
>    $ hg clone http://localhost:$HGPORT/ copy
> -  abort: error: Connection refused
> +  abort: error: Address family not supported by protocol

Not actually valid. ECONNREFUSED is very different from EAFNOSUPPORT.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list