master - test: Re-try with loopback if a backing device is too small.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7a0aa25c28ccb89834a83b06917be803713b4804 Commit: 7a0aa25c28ccb89834a83b06917be803713b4804 Parent: f3cc6576ee065b02ff58974f0f0e8792dffbd824 Author: Petr Rockai <[email protected]> AuthorDate: Tue Sep 30 16:19:14 2014 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Thu Feb 5 13:47:21 2015 +0100
test: Re-try with loopback if a backing device is too small.
--- test/lib/aux.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
test/lib/aux.sh +7 -1
@@ -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