tests: remove hardcoded errno values
authorPaul Sonnenschein <paul@sonnenschein.ruhr>
Fri, 06 Dec 2019 15:30:06 +0100
changeset 43822 76d32a0edbc6
parent 43821 e6cda6efb12a
child 43823 ad84fc97d120
tests: remove hardcoded errno values Fixes test failures on hurd-i386 Ref: https://bugs.debian.org/946178 Differential Revision: https://phab.mercurial-scm.org/D7556
tests/test-largefiles-misc.t
tests/test-lfs-serve-access.t
tests/test-lfs.t
tests/test-repair-strip.t
--- a/tests/test-largefiles-misc.t	Thu Dec 05 15:50:47 2019 -0800
+++ b/tests/test-largefiles-misc.t	Fri Dec 06 15:30:06 2019 +0100
@@ -41,7 +41,7 @@
   > 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]
--- a/tests/test-lfs-serve-access.t	Thu Dec 05 15:50:47 2019 -0800
+++ b/tests/test-lfs-serve-access.t	Fri Dec 06 15:30:06 2019 +0100
@@ -341,13 +341,13 @@
   $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): (glob)
@@ -369,7 +369,7 @@
       res.setbodybytes(localstore.read(oid))
       blob = self._read(self.vfs, oid, verify)
       raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8"))
-  *Error: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error (glob)
+  *Error: [Errno *] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error (glob)
   
   $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
--- a/tests/test-lfs.t	Thu Dec 05 15:50:47 2019 -0800
+++ b/tests/test-lfs.t	Fri Dec 06 15:30:06 2019 +0100
@@ -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 *] $ENOENT$: 'missing.py' (glob)
   abort: repository requires features unknown to this Mercurial: lfs!
   (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
   [255]
--- a/tests/test-repair-strip.t	Thu Dec 05 15:50:47 2019 -0800
+++ b/tests/test-repair-strip.t	Fri Dec 06 15:30:06 2019 +0100
@@ -51,7 +51,7 @@
   transaction abort!
   failed to truncate data/b.i
   rollback failed - please run hg recover
-  (failure reason: [Errno 13] Permission denied .hg/store/data/b.i')
+  (failure reason: [Errno *] Permission denied .hg/store/data/b.i') (glob)
   strip failed, backup bundle
   abort: Permission denied .hg/store/data/b.i'
   % after update 0, strip 2
@@ -105,7 +105,7 @@
   transaction abort!
   failed to truncate 00manifest.i
   rollback failed - please run hg recover
-  (failure reason: [Errno 13] Permission denied .hg/store/00manifest.i')
+  (failure reason: [Errno *] Permission denied .hg/store/00manifest.i') (glob)
   strip failed, backup bundle
   abort: Permission denied .hg/store/00manifest.i'
   % after update 0, strip 2