qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 24/30] qemu-iotests: Preallocated zero clusters in 061
Date: Fri, 27 Sep 2013 17:39:24 +0200	[thread overview]
Message-ID: <1380296370-14523-25-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1380296370-14523-1-git-send-email-kwolf@redhat.com>

From: Max Reitz <mreitz@redhat.com>

Add a test case for zero cluster expansion on an image completely filled
with preallocated zero clusters to test 061.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/061     |  9 +++++++++
 tests/qemu-iotests/061.out | 11 +++++++++++
 2 files changed, 20 insertions(+)

diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061
index 5f04bfa..fa9319d 100755
--- a/tests/qemu-iotests/061
+++ b/tests/qemu-iotests/061
@@ -200,6 +200,15 @@ $QEMU_IMG snapshot -a foo "$TEST_IMG"
 _check_test_img
 $QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
 
+echo
+echo "=== Testing preallocated zero expansion on full image ==="
+echo
+IMGOPTS="compat=1.1" TEST_IMG="$TEST_IMG" _make_test_img 64M
+$QEMU_IO -c "write -P 0x2a 0 64M" "$TEST_IMG" -c "write -z 0 64M" | _filter_qemu_io
+$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
+_check_test_img
+$QEMU_IO -c "read -P 0 0 64M" "$TEST_IMG" | _filter_qemu_io
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out
index d42127f..4027e00 100644
--- a/tests/qemu-iotests/061.out
+++ b/tests/qemu-iotests/061.out
@@ -373,4 +373,15 @@ read 131072/131072 bytes at offset 0
 No errors were found on the image.
 read 131072/131072 bytes at offset 0
 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+=== Testing preallocated zero expansion on full image ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
+wrote 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+No errors were found on the image.
+read 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 *** done
-- 
1.8.1.4

  parent reply	other threads:[~2013-09-27 15:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 15:39 [Qemu-devel] [PULL 00/30] Block patches Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 01/30] block: fix backing file overriding Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 02/30] qemu-iotests: add test for " Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 03/30] qemu-iotests: Do not execute 052 with -nocache Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 04/30] qcow2: Don't shadow return value Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 05/30] block/get_block_status: set *pnum = 0 on error Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 06/30] block/get_block_status: avoid segfault if there is no backing_hd Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 07/30] vmdk: fix cluster size check for flat extents Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 08/30] qemu-iotests: fix test case 059 Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 09/30] qemu-iotests: add monolithicFlat creation test to 059 Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 10/30] block: introduce BlockDriver.bdrv_needs_filename to enable some drivers Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 11/30] block: Fix compiler warning (-Werror=uninitialized) Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 12/30] qdict: Extract qdict_extract_subqdict Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 13/30] rbd: avoid qemu_rbd_snap_list() memory leaks Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 14/30] block: vdi - use QEMU_PACKED for on-disk structures Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 15/30] block: vpc " Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 16/30] block: qcow2 - used " Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 17/30] block: qed - use " Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 18/30] qcow2: Assert against currently impossible overflow Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 19/30] block: use DIV_ROUND_UP in bdrv_co_do_readv Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 20/30] qemu-iotests: fix qmp.py search path Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 21/30] qemu-iotests: Add basic ability to use binary sample images Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 22/30] qemu-iotests: Quote $TEST_IMG* and $TEST_DIR usage Kevin Wolf
2013-09-27 15:39 ` Kevin Wolf [this message]
2013-09-27 15:39 ` [Qemu-devel] [PULL 25/30] qcow2: Don't put invalid L2 table into cache Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 26/30] qcow2: Always use error path in l2_allocate Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 27/30] qcow2: Free only newly allocated clusters on error Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 28/30] qcow2: count_contiguous_clusters and compression Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 29/30] qcow2: COMPRESSED on count_contiguous_clusters Kevin Wolf
2013-09-27 15:39 ` [Qemu-devel] [PULL 30/30] qcow2: Remove useless count_contiguous_clusters() parameter Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380296370-14523-25-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).