Bug#946178: mercurial: FTBFS on hurd-i386: Testsuite failures

2019-12-04 Thread Paul Sonnenschein
Source: mercurial
Severity: important
Version: 5.2-1
User: debian-hurd@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-hurd@lists.debian.org

Hello,

mercurial fails to build from source on hurd-i386 due to five failing
tests.

Of these tests, four fail due to unexpected error numbers.
This should be fixed in mercurial, because error numbers are not
standardized.

The test-http-bad-server.t fails due to an unexpected behaviour of
local sockets in the Hurd. This seems to be a bug in the Hurd itself
(pflocal specifically), being in violation of the POSIX specification
Issue 6 and newer.
This could be fixed by
 * Fixing the Hurd itself
 * Making the test more permissive
 * Blacklisting the test

The attached patch replaces the error number in the offending tests
with a * glob.

Thanks!


Excerpts from build log [0]:
> test-http-bad-server.t
> test-http-bad-server.t ... # Test test-http-bad-server.t 
> # Running sh "/tmp/hgtests.7iB8Fk/child58/test-http-bad-server.t.sh" 
> 
> --- /<>/tests/test-http-bad-server.t
> +++ /<>/tests/test-http-bad-server.t.err
> @@ -38,7 +38,7 @@
>$ cat hg.pid > $DAEMON_PIDS
>  
>$ hg clone http://localhost:$HGPORT/ clone
> -  abort: error: (\$ECONNRESET\$|\$EADDRNOTAVAIL\$) (re)
> +  abort: error: bad HTTP status line: No status line received - the
> server has closed the connection
>[255]
>  
>  (The server exits on its own, but there is a race between that and
> starting a new server.
> 
> ERROR: test-http-bad-server.t output changed
> !# Ret was: 0 (test-http-bad-server.t) 

> test-lfs.t
> test-lfs.t ... # Test test-lfs.t 
> # Running sh "/tmp/hgtests.7iB8Fk/child104/test-lfs.t.sh" 
> 
> --- /<>/tests/test-lfs.t
> +++ /<>/tests/test-lfs.t.err
> @@ -40,7 +40,7 @@
>> EOF
>  
>$ hg config extensions
> -  *** failed to import extension lfs from missing.py: [Errno 2]
> $ENOENT$: 'missing.py'
> +  *** failed to import extension lfs from missing.py: [Errno
> 1073741826] $ENOENT$: 'missing.py'
>abort: repository requires features unknown to this Mercurial:
> lfs!
>(see https://mercurial-scm.org/wiki/MissingRequirement for more
> information)
>[255]
> 
> ERROR: test-lfs.t output changed
> !# Ret was: 0 (test-lfs.t)

(Analogous failures exist for test-largefiles-misc.t, test-lfs-serve-
access.t and test-repair-strip.t)


[0]: 
https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=hurd-i386&ver=5.2-1&stamp=1573130161&raw=0
From: Paul Sonnenschein 
Description: Fix test failures on hurd-i386 (Errno values)
Forwarded: no

diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
index 11b9de3a..eed33f44 100644
--- a/tests/test-largefiles-misc.t
+++ b/tests/test-largefiles-misc.t
@@ -41,7 +41,7 @@ common commands affecting largefile.
   > EOF
 
   $ hg config extensions
-  *** failed to import extension largefiles from missing.py: [Errno 2] $ENOENT$: 'missing.py'
+  \*\*\* failed to import extension largefiles from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob)
   abort: repository requires features unknown to this Mercurial: largefiles!
   (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
   [255]
diff --git a/tests/test-lfs-serve-access.t b/tests/test-lfs-serve-access.t
index 940b6e78..b789462f 100644
--- a/tests/test-lfs-serve-access.t
+++ b/tests/test-lfs-serve-access.t
@@ -341,13 +341,13 @@ Test a checksum failure during the processing of the GET request
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  verifies = store.verify(oid) (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
+  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno *] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
   $LOCALIP - - [$ERRDATE$] HG error:   (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  verifies = store.verify(oid) (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
+  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno *] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
   $LOCALIP - - [$ERRDATE$] HG error:   (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last)

Re: Bug#946178: mercurial: FTBFS on hurd-i386: Testsuite failures

2019-12-04 Thread Paul Sonnenschein
Hello,

Am Mittwoch, den 04.12.2019, 23:26 +0100 schrieb Samuel Thibault:
> Paul Sonnenschein, le mer. 04 déc. 2019 21:45:14 +0100, a ecrit:
> > The test-http-bad-server.t fails due to an unexpected behaviour of
> > local sockets in the Hurd. This seems to be a bug in the Hurd
> > itself
> > (pflocal specifically), being in violation of the POSIX
> > specification
> > Issue 6 and newer.
> 
> Which violation is happening here?

According to POSIX, both read and recv shall set errno to ECONNRESET if
"[a] read was attempted on a socket and the connection was forcibly
closed by its peer." As far as I can tell, pflocal will never return
ECONNRESET.

After further study however, I do no longer believe that this is the
reason of the observed test failure, since connect already should fail.

I now have no idea why this test is failing.

Paul



signature.asc
Description: This is a digitally signed message part