autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testsuite: fixed spurious failure in vala4.test (w.r.t. Solaris sh)


From: Ralf Wildenhues
Subject: Re: testsuite: fixed spurious failure in vala4.test (w.r.t. Solaris sh)
Date: Sat, 5 Dec 2009 13:23:59 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Ralf Wildenhues wrote on Sat, Dec 05, 2009 at 01:02:58PM CET:
> [ adding autoconf-patches; this is
>   <http://thread.gmane.org/gmane.comp.sysutils.automake.patches/3698> ]
> 
> Proposed patch for Autoconf.  OK?

That was a pretty bad failure, with the example not matching the
description at all.  Next try.  OK?


commit 3efa7027f91c0f232c5b4bafba1ffd415a58cde8
Author: Stefano Lattarini <address@hidden>
Date:   Sat Dec 5 12:56:30 2009 +0100

    Document Solaris/Heirloom sh set -e issue with command substitutions.
    
    * doc/autoconf.texi (Limitations of Builtins): Fix typos `set -d'
    in previous example.  Document failure to honor && lists with set -e
    and a command substitution in the failing command.
    Report and initial patch by Stefano Lattarini against Automake.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index e03604d..1c0c612 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-05  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Document Solaris/Heirloom sh set -e issue with command substitutions.
+       * doc/autoconf.texi (Limitations of Builtins): Fix typos `set -d'
+       in previous example.  Document failure to honor && lists with set -e
+       and a command substitution in the failing command.
+       Report and initial patch by Stefano Lattarini against Automake.
+
 2009-12-04  Eric Blake  <address@hidden>
 
        Warn if using unnamed diversion.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 7d2c72e..3144610 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -16794,12 +16794,23 @@ Limitations of Builtins
 Solaris @command{/bin/sh} cannot be ignored, even with @samp{||}.
 
 @example
-$ @kbd{/bin/sh -c 'set -d; foo=`false` || echo foo; echo bar'}
-$ @kbd{bash -c 'set -d; foo=`false` || echo foo; echo bar'}
+$ @kbd{/bin/sh -c 'set -e; foo=`false` || echo foo; echo bar'}
+$ @kbd{bash -c 'set -e; foo=`false` || echo foo; echo bar'}
 foo
 bar
 @end example
 
address@hidden
+Moreover, a command substitution, successful or not, causes this shell to
+exit from a failing outer command even in presence of an @samp{&&} list:
+
address@hidden
+$ @kbd{bash -c 'set -e; false `true` && echo notreached; echo ok'}
+ok
+$ @kbd{sh -c 'set -e; false `true` && echo notreached; echo ok'}
+$
address@hidden example
+
 Portable scripts should not use @samp{set -e} if @command{trap} is used
 to install an exit handler.  This is because Tru64/OSF 5.1 @command{sh}
 sometimes enters the trap handler with the exit status of the command




reply via email to

[Prev in Thread] Current Thread [Next in Thread]