Hi Thien-Thi, thanks for the report and the patch. On 04/26/2012 11:45 AM, Thien-Thi Nguyen wrote: > Automake 1.12 "make check" reported only one FAIL, which I traced > to a strange value for var 'd' in t/remake11.sh, leaking in from > the environment. > Do you have an environment variable named 'd'? I like minimalism, but this seems a little over-the-top ;-)
Anyway, you're right that this is a testsuite weakness, and your fix is correct (with a minor caveat below). > Anyway, here's the trivial patch: > > diff -u t/remake11.sh\~ t/remake11.sh > --- t/remake11.sh~ 2012-04-21 16:38:05.000000000 +0200 > +++ t/remake11.sh 2012-04-26 11:31:18.000000000 +0200 > @@ -30,6 +30,7 @@ > > echo "@FOO@" > bar.in > echo "AC_CONFIG_FILES([bar])" >> configure.ac > + unset d > for i in 0 1 2 3 4 5 6 7 8 9; do > d=${d+"$d/"}sub$i > echo "SUBDIRS = sub$i" > Makefile.am > Unfortunately, the Korn shell and the POSIX shell on Solaris, as well as some older bash versions, have an 'unset' builtin that returns exit status '1' when it tries to unset an already-unset variable; so we need a little correction to your patch: echo "AC_CONFIG_FILES([bar])" >> configure.ac +d=; unset d # Avoid unduly interferences from the environment. for i in 0 1 2 3 4 5 6 7 8 9; do > and a suitable ChangeLog entry: > > tests: unset local var to prevent env influence > * t/remake11.sh: Unset 'd' before first use. > I used this slightly modified message: tests: avoid yet another spurious environment influence * t/remake11.sh: Unset 'd' before first use. and applied the patch in your name. Attached is what I've pushed. > Probably the entire suite should be audited for this class of bug. > This seems like overkill, since such bugs are pretty unlikely, involve the testsuite only (not the actual automake program), and are and very easy to fix once revealed. But if you feel like wanting to do some auditing yourself anyway, please be my guest :-) > Anyway, now I can happily move on to "make install"... > And you might want to run the 'installcheck' target thereafter (yes, now automake has a real 'installcheck' target!) Thanks, Stefano
>From f31fe4f003b0eb12eb082ae4dca837f36eaac214 Mon Sep 17 00:00:00 2001 Message-Id: <f31fe4f003b0eb12eb082ae4dca837f36eaac214.1335436367.git.stefano.lattar...@gmail.com> From: Thien-Thi Nguyen <t...@gnuvola.org> Date: Thu, 26 Apr 2012 12:30:10 +0200 Subject: [PATCH] tests: avoid yet another spurious environment influence * t/remake11.sh: Unset 'd' before first use. Copyright-paperwork-exempt: yes Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- t/remake11.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/remake11.sh b/t/remake11.sh index ec96a08..b88254f 100755 --- a/t/remake11.sh +++ b/t/remake11.sh @@ -30,6 +30,7 @@ echo "AC_SUBST([FOO], [$magic1])" >> configure.ac echo "@FOO@" > bar.in echo "AC_CONFIG_FILES([bar])" >> configure.ac +d=; unset d # Avoid unduly interferences from the environment. for i in 0 1 2 3 4 5 6 7 8 9; do d=${d+"$d/"}sub$i echo "SUBDIRS = sub$i" > Makefile.am -- 1.7.9.5