Different (but valid) output in the testsuite
Javi Merino
cibervicho at gmail.com
Thu Mar 15 18:31:27 CDT 2012
On Mon, Mar 12, 2012 at 02:32:36PM -0500, Matt Mackall wrote:
> 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.
Ok, I've sent a patch that does just that.
> > --- /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.
I'll have a look at test-pending.t and try to fix these tests.
> > 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.
I agree completely, but the likely response is going to be: "Don't
hardcode error numbers in the testsuite".
I don't really know what to do with this one, I think I'll just skip
the testsuite in hurd.
> > --- /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.
Right, but that doesn't mean that mercurial is broken, it's just that
the kernel doesn't support IP. I may improve has_serve() in hghave to
cover this and the possibility that the loopback interface is not
configured so that these tests are skipped in those systems.
Cheers,
Javi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120315/2367c419/attachment.pgp>
More information about the Mercurial-devel
mailing list