diff options
author | Petr Rockai <prockai@redhat.com> | 2014-09-30 16:19:14 +0200 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2014-11-18 19:02:07 +0100 |
commit | 2e750041e3f4af376c5852469742535766654123 (patch) | |
tree | 6cbb8b60610670a64e0b9c355ee3e9ec4823a27a | |
parent | bb126aba3ecf80e87beda80f2313ee462b2b8518 (diff) | |
download | lvm2-2e750041e3f4af376c5852469742535766654123.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 64443062f..f8e0d205c 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 |