diff options
author | Petr Rockai <prockai@redhat.com> | 2014-09-30 16:19:14 +0200 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2014-10-01 08:22:54 +0200 |
commit | d2b9d0ea018b6875108edf5080652e957930f079 (patch) | |
tree | 863c023e15e85bfc24aec9cd50e2bb7d826b0fa9 | |
parent | fa4f8ba69eee6a0caf071183082fcbece06508e1 (diff) | |
download | lvm2-d2b9d0ea018b6875108edf5080652e957930f079.tar.gz |
test: Re-try with loopback if a backing device is too small.
-rw-r--r-- | test/lib/aux.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 45643cc0d..18724c48c 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -369,7 +369,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 |