autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 4/5] remove shell function "spy"


From: Eric Blake
Subject: Re: [PATCH 4/5] remove shell function "spy"
Date: Wed, 8 Oct 2008 17:47:12 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> According to Paolo Bonzini on 9/18/2008 8:14 AM:
> > This patch removes the shell function "spy" that was added a
> > few years ago.  It did help finding a couple of bugs, it has
> > made its time though.
> 
> Agreed.  I've applied this one as-is.

More evidence that relying on shell functions is correct: ever since autoconf 
2.62, autotest has been using shell functions without explicitly requiring them 
(it was only suggesting them).  In other words, we have been lucky that the 
testsuite has always managed to find and re-exec within a shell that meets all 
the suggestions, because if we hadn't, we would have heard complaints about 
testsuites failing with syntax errors.  If we don't apply Paolo's patch 5, then 
we should really check in something like this, to make autotest's use of shell 
functions explicit (rather than relying on the luck of suggestions being met).  
However, Paolo's patch makes AS_PREPARE require rather than suggest shell 
functions, at which point this patch is nothing more than documentation.  So 
does anyone still think this is worth pushing?  I'm personally thinking of 
dropping it, with just this mail as an archive of why.

On the other hand, I've noticed that we don't do any sanity checking if 
CONFIG_SHELL is set.  Would it make sense to require that CONFIG_SHELL can pass 
all of the required tests, and if not, complain to the user and abort rather 
than the current behavior of trying to limp along until the use of a required 
feature finally trips up the script?

From: Eric Blake <address@hidden>
Date: Wed, 8 Oct 2008 11:16:44 -0600
Subject: [PATCH] Require shell functions to run autotest.

* lib/autotest/general.m4 (AT_INIT): Make use of shell functions
an explicit requirement.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    4 ++++
 lib/autotest/general.m4 |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 61c6c39..7efd1ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-10-08  Eric Blake  <address@hidden>
 
+       Require shell functions to run autotest.
+       * lib/autotest/general.m4 (AT_INIT): Make use of shell functions
+       an explicit requirement.
+
        Resync from gnulib.
        * cfg.mk (cvs_executable_files, cvs_files): Rewrite...
        (fetch): ...into new target.
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index d19f9d9..a247864 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -223,6 +223,7 @@ Free Software Foundation, Inc.
 This test suite is free software; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.])
 AS_PREPARE
+_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl
 
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-- 
1.6.0.2








reply via email to

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