aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/237
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/237')
-rwxr-xr-xtests/qemu-iotests/2376
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237
index e04a1ac6be..251771d7fb 100755
--- a/tests/qemu-iotests/237
+++ b/tests/qemu-iotests/237
@@ -20,6 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+import math
import iotests
from iotests import imgfmt
@@ -222,12 +223,15 @@ with iotests.FilePath('t.vmdk') as disk_path, \
iotests.log("= %s %d =" % (subfmt, size))
iotests.log("")
+ num_extents = math.ceil(size / 2.0**31)
+ extents = [ "ext%d" % (i) for i in range(1, num_extents + 1) ]
+
vm.launch()
blockdev_create(vm, { 'driver': imgfmt,
'file': 'node0',
'size': size,
'subformat': subfmt,
- 'extents': ['ext1', 'ext2', 'ext3'] })
+ 'extents': extents })
vm.shutdown()
iotests.img_info_log(disk_path)