[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] [PATCH] tests: set fail=0 by default
From: |
Jim Meyering |
Subject: |
Re: [coreutils] [PATCH] tests: set fail=0 by default |
Date: |
Sat, 18 Dec 2010 08:55:22 +0100 |
Paul Eggert wrote:
> I found this one by tracking down a bug with the latest snapshot
> on Solaris. Still haven't got to the real bug yet, but this bug
> was getting in the way.
>
> Subject: [PATCH] tests: set fail=0 by default
>
> * tests/init.sh (setup_): Set fail=0. This was the intent as per
> <http://lists.gnu.org/archive/html/bug-coreutils/2010-12/msg00058.html>
> but the assignment in mktempd_ is ineffective, since mktempd_
> is used inside `` and its assignments are in a subshell.
> ---
> tests/init.sh | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/tests/init.sh b/tests/init.sh
> index a57de77..7be5e9e 100644
> --- a/tests/init.sh
> +++ b/tests/init.sh
> @@ -336,6 +336,9 @@ setup_()
> for sig_ in 1 2 3 13 15; do
> eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
> done
> +
> + # Set up for the "Exit $fail" at the end of many tests.
> + fail=0
Thanks for spotting and fixing that.
This is a new bug.
test-lib.sh had a working fail=0 initialization since Oct 30:
tests: factor 350 fail=0 initializations into test-lib.sh
http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=3c88587b2eadee1
but then I converted all bourne shell test scripts to use init.sh rather
than the aging test-lib.sh, and init.sh did not have that initialization.
This change probably belongs in gnulib's tests/init.sh, too.