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-17 13:31:44 -0500
commit02f3005ada435e628c40c515831dd2e72ad18e43 (patch)
tree9fe9008e08d4c1a7f8412c32fe5c770a27e69192
parent1fde82adcc0257211df1d275704167c0ab438131 (diff)
downloadlvm2-02f3005ada435e628c40c515831dd2e72ad18e43.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)";;