]> Git Repo - qemu.git/blobdiff - tests/qemu-iotests/025
iotests: Add qemu_io_log()
[qemu.git] / tests / qemu-iotests / 025
index 467a4b7090a9007ce6b46e57a02ff2adf92a7533..e05d833452dc250e62d242219e0eb9c662db4127 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Resizing images
 #
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
-tmp=/tmp/$$
 status=1       # failure is the default!
 
 _cleanup()
@@ -39,9 +37,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.pattern
 
-_supported_fmt raw qcow2 qed
-_supported_proto file sheepdog rbd nfs archipelago
-_supported_os Linux
+_supported_fmt raw qcow2 qed luks
+_supported_proto file sheepdog rbd nfs
 
 echo "=== Creating image"
 echo
@@ -63,6 +60,13 @@ length
 EOF
 _check_test_img
 
+# bdrv_truncate() doesn't zero the new space, so we need to do that explicitly.
+# We still want to test automatic zeroing for other formats even though
+# bdrv_truncate() doesn't guarantee it.
+if [ "$IMGFMT" == "luks" ]; then
+    $QEMU_IO -c "write -z $small_size $((big_size - small_size))" "$TEST_IMG" > /dev/null
+fi
+
 echo
 echo "=== Verifying image size after reopen"
 $QEMU_IO -c "length" "$TEST_IMG"
This page took 0.025148 seconds and 4 git commands to generate.