Patchwork tests: don't hardcode errno==2 for ENOENT

login
register
mail settings
Submitter Julien Cristau
Date Dec. 4, 2012, 1:43 p.m.
Message ID <a7f07df1a57152a027fe.1354628588@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/12/
State Accepted
Commit 5dbefa8469034e0fbc625b8debdc4e3a028b47e5
Headers show

Comments

Julien Cristau - Dec. 4, 2012, 1:43 p.m.
# HG changeset patch
# User Julien Cristau <julien.cristau at logilab.fr>
# Date 1354628102 -3600
# Branch stable
# Node ID a7f07df1a57152a027fe0fe0629d26789c89e989
# Parent  5cafcac2414c7f0ebe9f1a29e994fa0d33491ad9
tests: don't hardcode errno==2 for ENOENT

Hurd seems to set ENOENT to 2 + 2**30, unlike everyone else.
Matt Mackall - Dec. 4, 2012, 10:30 p.m.
On Tue, 2012-12-04 at 14:43 +0100, Julien Cristau wrote:
> # HG changeset patch
> # User Julien Cristau <julien.cristau at logilab.fr>
> # Date 1354628102 -3600
> # Branch stable
> # Node ID a7f07df1a57152a027fe0fe0629d26789c89e989
> # Parent  5cafcac2414c7f0ebe9f1a29e994fa0d33491ad9
> tests: don't hardcode errno==2 for ENOENT
>
> Hurd seems to set ENOENT to 2 + 2**30, unlike everyone else.

Patch grudgingly queued for stable. I'm pretty sure that HURD stands for
"Hurd Users Relish Deviance" so I would expect Hurd folks to actually
appreciate these test failures.

> diff --git a/tests/test-acl.t b/tests/test-acl.t
> --- a/tests/test-acl.t
> +++ b/tests/test-acl.t
> @@ -887,11 +887,11 @@ file specified by acl.config does not ex
>    adding quux/file.py revisions
>    files: 3/3 chunks (100.00%)
>    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 *] *: '../acl.config' (glob)
>    transaction abort!
>    rollback completed
>    abort: *: ../acl.config (glob)
>    no rollback information available
>    0:6675d58eff77
> diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t
> --- a/tests/test-qrecord.t
> +++ b/tests/test-qrecord.t
> @@ -108,11 +108,11 @@ qrecord patch (mq not present)
>  
>  help (bad mq)
>  
>    $ echo "mq=nonexistent" >> $HGRCPATH
>    $ hg help qrecord
> -  *** failed to import extension mq from nonexistent: [Errno 2] * (glob)
> +  *** failed to import extension mq from nonexistent: [Errno *] * (glob)
>    hg qrecord [OPTION]... PATCH [FILE]...
>    
>    interactively record a new patch
>    
>        See "hg help qnew" & "hg help record" for more information and usage.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-acl.t b/tests/test-acl.t
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -887,11 +887,11 @@  file specified by acl.config does not ex
   adding quux/file.py revisions
   files: 3/3 chunks (100.00%)
   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 *] *: '../acl.config' (glob)
   transaction abort!
   rollback completed
   abort: *: ../acl.config (glob)
   no rollback information available
   0:6675d58eff77
diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t
--- a/tests/test-qrecord.t
+++ b/tests/test-qrecord.t
@@ -108,11 +108,11 @@  qrecord patch (mq not present)
 
 help (bad mq)
 
   $ echo "mq=nonexistent" >> $HGRCPATH
   $ hg help qrecord
-  *** failed to import extension mq from nonexistent: [Errno 2] * (glob)
+  *** failed to import extension mq from nonexistent: [Errno *] * (glob)
   hg qrecord [OPTION]... PATCH [FILE]...
   
   interactively record a new patch
   
       See "hg help qnew" & "hg help record" for more information and usage.