Patchwork D7556: tests: remove hardcoded errno values

login
register
mail settings
Submitter phabricator
Date Dec. 6, 2019, 2:41 p.m.
Message ID <differential-rev-PHID-DREV-h6dpm5sklvm56nprrh6g-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43594/
State Superseded
Headers show

Comments

phabricator - Dec. 6, 2019, 2:41 p.m.
jcristau created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Fixes test failures on hurd-i386
  
  Ref: https://bugs.debian.org/946178

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7556

AFFECTED FILES
  tests/test-largefiles-misc.t
  tests/test-lfs-serve-access.t
  tests/test-lfs.t
  tests/test-repair-strip.t

CHANGE DETAILS




To: jcristau, #hg-reviewers
Cc: mercurial-devel
phabricator - Dec. 6, 2019, 2:58 p.m.
pulkit added a comment.


  This is for stable branch or default?

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7556/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7556

To: jcristau, #hg-reviewers, pulkit
Cc: mercurial-devel
phabricator - Dec. 6, 2019, 3 p.m.
jcristau added a comment.


  I think default is good enough.

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7556/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7556

To: jcristau, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-repair-strip.t b/tests/test-repair-strip.t
--- a/tests/test-repair-strip.t
+++ b/tests/test-repair-strip.t
@@ -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
diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -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]
diff --git a/tests/test-lfs-serve-access.t b/tests/test-lfs-serve-access.t
--- a/tests/test-lfs-serve-access.t
+++ b/tests/test-lfs-serve-access.t
@@ -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)
diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
--- a/tests/test-largefiles-misc.t
+++ b/tests/test-largefiles-misc.t
@@ -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]