diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh index 7f49b0200..5b3ad87d4 100644 --- a/test/lib/inittest.sh +++ b/test/lib/inittest.sh @@ -29,7 +29,8 @@ TESTOLDPWD=$(pwd) COMMON_PREFIX="LVMTEST" PREFIX="${COMMON_PREFIX}$$" -TESTDIR=$(mkdtemp "${LVM_TEST_DIR:-$TESTOLDPWD}" "$PREFIX.XXXXXXXXXX") || \ +if test -n "$LVM_TEST_DIR"; then LVM_TEST_DIR=$TMPDIR; fi +TESTDIR=$(mkdtemp "${LVM_TEST_DIR:-/tmp}" "$PREFIX.XXXXXXXXXX") || \ die "failed to create temporary directory in ${LVM_TEST_DIR:-$TESTOLDPWD}" RUNNING_DMEVENTD=$(pgrep dmeventd) || true