From: Martin Schwenke Date: Sat, 18 Mar 2017 09:38:32 +0000 (+1100) Subject: ctdb-tests: Catch cases where mktemp fails due to missing TMPDIR X-Git-Tag: tdb-1.3.13~437 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e78b8875312d263ee9ad67e740610019d25ef7ad;p=thirdparty%2Fsamba.git ctdb-tests: Catch cases where mktemp fails due to missing TMPDIR TMPDIR sometimes goes missing during autobuild. When that happens the error messages produced by CTDB tests are not very helpful. This should make it clear. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Mon Mar 20 08:53:02 CET 2017 on sn-devel-144 --- diff --git a/ctdb/tests/run_tests.sh b/ctdb/tests/run_tests.sh index f128d959252..d5f31167ee3 100755 --- a/ctdb/tests/run_tests.sh +++ b/ctdb/tests/run_tests.sh @@ -172,8 +172,8 @@ if ! which mktemp >/dev/null 2>&1 ; then } fi -tf=$(mktemp) -sf=$(mktemp) +tf=$(mktemp) || die "mktemp failed for tf - is TMPDIR missing?" +sf=$(mktemp) || die "mktemp failed for sf - is TMPDIR missing?" set -o pipefail