]> sourceware.org Git - lvm2.git/commitdiff
test: Re-try with loopback if a backing device is too small.
authorPetr Rockai <prockai@redhat.com>
Tue, 30 Sep 2014 14:19:14 +0000 (16:19 +0200)
committerPetr Rockai <prockai@redhat.com>
Thu, 5 Feb 2015 12:47:21 +0000 (13:47 +0100)
test/lib/aux.sh

index 84edb7d79873d2df13658a5af26fcf226bfb11af..32268a6936de4de0c4e01e5b84e453973c665433 100644 (file)
@@ -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
 
This page took 0.038419 seconds and 5 git commands to generate.