From 68e0cfc37d3653b288400b4e2445519574aeaadf Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Mon, 20 Dec 2010 05:55:28 +0000 Subject: [PATCH] tests: set fail=0 at start * tests/init.sh (setup_): Move fail=0 initialization here ... (mktempd_): ... from here, so that tests can rely on fail being set to 0 initially. This fixes a problem in coreutils; see: http://lists.gnu.org/archive/html/coreutils/2010-12/msg00083.html (cherry picked from commit 15a8eaf23e076da8f6e46b68a509b1519c3b3374) --- ChangeLog | 8 ++++++++ tests/init.sh | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4d525680..c40cbad46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-12-18 Paul Eggert + + tests: set fail=0 at start + * tests/init.sh (setup_): Move fail=0 initialization here ... + (mktempd_): ... from here, so that tests can rely on fail being + set to 0 initially. This fixes a problem in coreutils; see: + http://lists.gnu.org/archive/html/coreutils/2010-12/msg00083.html + 2010-12-13 Eric Blake cloexec, fcntl: relax license diff --git a/tests/init.sh b/tests/init.sh index 14f3b198d..4d89a1af6 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -324,6 +324,7 @@ setup_() fi initial_cwd_=$PWD + fail=0 pfx_=`testdir_prefix_` test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ @@ -416,8 +417,6 @@ mktempd_() *) fail_ "invalid template: $template_ (must have a suffix of at least 4 X's)";; esac - fail=0 - # First, try to use mktemp. d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ || fail=1 -- 2.11.0