summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2015-06-04 11:31:24 +0200
committerDavid Teigland <teigland@redhat.com>2015-06-23 17:08:53 -0500
commit45485de49fba1f35ba93ab1ada88beeda1184e3a (patch)
tree36bc121c8a1278a14224ecf0055be7806f36e675
parent48ab6e74ce97e5ce0c1588494bf35626cfff218d (diff)
downloadlvm2-45485de49fba1f35ba93ab1ada88beeda1184e3a.tar.gz
mkdir later is not creating parent directories.
The parent directory (DIR) should either exist or should be created. It is not desirable to use `mkdir -p` which could lead to existing directory reuse.
-rw-r--r--test/lib/utils.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index fe7ccd3bc..24c9076d4 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -57,6 +57,8 @@ mkdtemp() {
destdir=$1
template=$2
+ test -d "$destdir" || die "DIR ('$destdir') does not exist."
+
case "$template" in
*XXXX) ;;
*) die "Invalid template: $template (must have a suffix of at least 4 X's)";;