diff options
author | Petr Rockai <prockai@redhat.com> | 2014-09-30 16:19:14 +0200 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2014-11-20 12:36:47 +0100 |
commit | 3c67053559f16397c58ec45d80de21f9e41e8afa (patch) | |
tree | d6ff3f57b13c0facb2543236bfd457fa1e7a4001 | |
parent | ae52119c8b12e2cb3936f787c1d0ad2369d5cfd1 (diff) | |
download | lvm2-3c67053559f16397c58ec45d80de21f9e41e8afa.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 |