summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-09-30 16:19:14 +0200
committerPetr Rockai <prockai@redhat.com>2015-02-05 13:47:21 +0100
commit7a0aa25c28ccb89834a83b06917be803713b4804 (patch)
tree9d035418bdd131fb75681ef08496a30ec9f9be22
parentf3cc6576ee065b02ff58974f0f0e8792dffbd824 (diff)
downloadlvm2-7a0aa25c28ccb89834a83b06917be803713b4804.tar.gz
test: Re-try with loopback if a backing device is too small.
-rw-r--r--test/lib/aux.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 84edb7d79..32268a693 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -370,7 +370,13 @@ prepare_devs() {
DEVICES[$count]=$dev
count=$(( $count + 1 ))
echo 0 $size linear "$BACKING_DEV" $((($i-1)*$size)) > "$name.table"
- dmsetup create -u "TEST-$name" "$name" "$name.table"
+ if not dmsetup create -u "TEST-$name" "$name" "$name.table" &&
+ test -n "$LVM_TEST_BACKING_DEVICE";
+ then # maybe the backing device is too small for this test
+ LVM_TEST_BACKING_DEVICE=
+ prepare_devs "$@"
+ return $?
+ fi
done
finish_udev_transaction