automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1.11-1186-g93fcb73
Date: Wed, 28 Sep 2011 14:40:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=93fcb730612dee65684862c41de1f287292abd2c

The branch, test-protocols has been updated
       via  93fcb730612dee65684862c41de1f287292abd2c (commit)
       via  c6988f3340d0c967b9403f5a2569bec1c8413913 (commit)
      from  f67e562db4a8a4b94af30e30e7f3f709f89bd0e1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 93fcb730612dee65684862c41de1f287292abd2c
Author: Stefano Lattarini <address@hidden>
Date:   Wed Sep 28 16:31:24 2011 +0200

    tap/awk: account for unusual korn shell signal handling behaviour
    
    This change has been motivated by a testsuite failure on Debian
    with the AT&T Korn Shell version 93u-1.
    
    * lib/tap-driver.sh: Temporarily ignore some common signals when
    waiting for the test command to complete, to avoid premature exit
    in Korn shells that propagate to themselves signals that have
    killed a child process.
    
    See also related commit `v1.11-1342-g6321ad3'.

commit c6988f3340d0c967b9403f5a2569bec1c8413913
Author: Stefano Lattarini <address@hidden>
Date:   Wed Sep 28 16:05:06 2011 +0200

    tap/awk: handle exit statuses > 256 (seen on few korn shells)
    
    Some Korn shells, when a child process die due to signal number
    n, can leave in $? an exit status of 256+n instead of the more
    standard 128+n.  Apparently, both behaviours are allowed by
    POSIX, so be prepared to handle them both.
    This change has been motivated by a testsuite failure on Debian
    with the AT&T Korn Shell version 93u-1.
    
    * lib/tap-driver.sh (get_test_exit_message): Handle the described
    Korn Shell behaviour too.
    ($scriptversion): Update.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   24 ++++++++++++++++++++++++
 lib/tap-driver.sh |   29 +++++++++++++++++++++++++----
 2 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4fb02f5..a6779c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2011-09-28  Stefano Lattarini  <address@hidden>
+
+       tap/awk: account for unusual korn shell signal handling behaviour
+       This change has been motivated by a testsuite failure on Debian
+       with the AT&T Korn Shell version 93u-1.
+       * lib/tap-driver.sh: Temporarily ignore some common signals when
+       waiting for the test command to complete, to avoid premature exit
+       in Korn shells that propagate to themselves signals that have
+       killed a child process.
+       See also related commit `v1.11-1342-g6321ad3'.
+
+2011-09-28  Stefano Lattarini  <address@hidden>
+
+       tap/awk: handle exit statuses > 256 (seen on few korn shells)
+       Some Korn shells, when a child process die due to signal number
+       n, can leave in $? an exit status of 256+n instead of the more
+       standard 128+n.  Apparently, both behaviours are allowed by
+       POSIX, so be prepared to handle them both.
+       This change has been motivated by a testsuite failure on Debian
+       with the AT&T Korn Shell version 93u-1.
+       * lib/tap-driver.sh (get_test_exit_message): Handle the described
+       Korn Shell behaviour too.
+       ($scriptversion): Update.
+
 2011-09-24  Stefano Lattarini  <address@hidden>
 
        uninstall: "make uninstall" before "make install" works
diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh
index 44317d9..e9f1037 100755
--- a/lib/tap-driver.sh
+++ b/lib/tap-driver.sh
@@ -23,7 +23,7 @@
 # bugs to <address@hidden> or send patches to
 # <address@hidden>.
 
-scriptversion=2011-08-25.11; # UTC
+scriptversion=2011-09-28.14; # UTC
 
 # Make unconditional expansion of undefined variables an error.  This
 # helps a lot in preventing typo-related bugs.
@@ -116,14 +116,27 @@ else
 fi
 
 {
-  { if test $merge -gt 0; then
+  (
+    # Ignore common signals (in this subshell only!) to avoid potential
+    # problems with Korn shells.  Some Korn shells are known to propagate
+    # to themselves signals that have killed a child process they were
+    # waiting for (this is done at least for SIGINT -- and usually only
+    # for it in truth); this would cause a premature exit in this subshell,
+    # so that the awk script would never seen the exit status it expects
+    # on its last input line (and which is displayed below by the last
+    # `echo $?' command), and would thus die reporting an internal error.
+    # For more information, see the Autoconf manual and the threads:
+    # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
+    # 
<http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
+    trap : 1 3 2 13 15
+    if test $merge -gt 0; then
       exec 2>&1
     else
       exec 2>&3
     fi
     "$@"
     echo $?
-  } | LC_ALL=C ${AM_TAP_AWK-awk} \
+  ) | LC_ALL=C ${AM_TAP_AWK-awk} \
         -v me="$me" \
         -v test_script_name="$test_name" \
         -v log_file="$log_file" \
@@ -440,7 +453,15 @@ function get_test_exit_message(status)
     exit_details = " (command not found?)"
   else if (status >= 128 && status <= 255)
     exit_details = sprintf(" (terminated by signal %d?)", status - 128)
-  else if (status >= 256)
+  else if (status > 256 && status <= 384)
+    # We used to report an "abnormal termination" here, but some Korn
+    # shells, when a child process die due to signal number n, can leave
+    # in $? an exit status of 256+n instead of the more standard 128+n.
+    # Apparently, both behaviours are allowed by POSIX (2008), so be
+    # prepared to handle them both.
+    exit_details = sprintf(" (terminated by signal %d?)", status - 256)
+  else
+    # Never seen in practice.
     exit_details = " (abnormal termination)"
   return sprintf("exited with status %d%s", status, exit_details)
 }


hooks/post-receive
-- 
GNU Automake



reply via email to

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