Hi all.

First of all, I must admit that the bug described here is so little
and unimportant that this mail could be described as nitpicking
rather than as bug reporting -- but here it goes anyway.

I have the latest automake sources checked out from git.

I found the following glitch in the exit trap code setup in file
`tests/defs.in',  (around lines 267-270): the variable `$as_me'
is used in error messages as the name of the test, while the
variable `$me'  should be used instead (the variable $as_me
is never defined).

This "bug" can be triggered e.g. by doing from within the tests 
directory:
  $ ./aclibobj.test
and hitting CTRL-C (almost) immediately.
The displayed error message is something like this:
  + cd /home/stefano/src/automake/tests
  + case $exit_status,$keep_testdirs in
  + test 2 '!=' 0
  + echo ': caught signal 2'
  : caught signal 2
  + echo ': exit 1'
  : exit 1
  + exit 1
while it should have been something like this:
  + cd /home/stefano/src/automake/tests
  + case $exit_status,$keep_testdirs in
  + test 2 '!=' 0
  + echo 'aclibobj: caught signal 2'
  aclibobj: caught signal 2
  + echo 'aclibobj: exit 1'
  aclibobj: exit 1
  + exit 1

Attached is a tiny patch that should fix this glitch.
After applying it, I also rerun the testsuite, just to be sure.  No 
error showed up.

Regards,
   Stefano
From a6c6de0ad555ae505d75a9b63e00ba2c5e1358e8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Wed, 2 Sep 2009 00:52:38 +0200
Subject: [PATCH] testsuite: fix a minor glitch.

* tests/defs.in (exit trap): Use `$me', not `$as_me', as the
name of the current test (used in error messages).
---
 ChangeLog     |    6 ++++++
 tests/defs.in |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bab1dcb..6c1c097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-01  Stefano Lattarini  <stefano.lattar...@gmail.com> (tiny change)
+
+	testsuite: fix a minor glitch.
+	* tests/defs.in (exit trap): Use `$me', not `$as_me', as the
+	name of the current test (used in error messages).
+
 2009-07-08  Jim Meyering  <meyer...@redhat.com>
 
 	manual: fix a trivial grammar error.
diff --git a/tests/defs.in b/tests/defs.in
index d1366f1..61182b6 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -265,8 +265,8 @@ if test "$sh_errexit_works" = yes; then
       ;;
     esac
     test "$signal" != 0 &&
-      echo "$as_me: caught signal $signal"
-    echo "$as_me: exit $exit_status"
+      echo "$me: caught signal $signal"
+    echo "$me: exit $exit_status"
     exit $exit_status
   ' 0
   for signal in 1 2 13 15; do
-- 
1.6.3.3

Reply via email to