qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PULL 04/22] block: add test for vhdx image created by Disk2VHD
Date: Mon, 19 May 2014 16:22:22 +0200	[thread overview]
Message-ID: <1400509360-25470-5-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1400509360-25470-1-git-send-email-kwolf@redhat.com>

From: Jeff Cody <jcody@redhat.com>

This adds a test for VHDX images created by Microsoft's tool, Disk2VHD.

VHDX images created by this tool have 2 identical header sections, with
identical sequence numbers.  This makes sure we detect VHDX images with
identical headers, and do not flag them as corrupt.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/070                                  |   7 +++++++
 tests/qemu-iotests/070.out                              |   7 +++++++
 tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2 | Bin 0 -> 1424 bytes
 3 files changed, 14 insertions(+)
 create mode 100644 tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2

diff --git a/tests/qemu-iotests/070 b/tests/qemu-iotests/070
index ce71fa4..ea0dae7 100755
--- a/tests/qemu-iotests/070
+++ b/tests/qemu-iotests/070
@@ -72,6 +72,13 @@ echo "=== Verify open image read-only succeeds after log replay ==="
 $QEMU_IO -r -c "read -pP 0xa5 0 18M" "$TEST_IMG" 2>&1 | _filter_testdir \
                                                       | _filter_qemu_io
 
+_cleanup_test_img
+_use_sample_img test-disk2vhd.vhdx.bz2
+
+echo
+echo "=== Verify image created by Disk2VHD can be opened ==="
+$QEMU_IMG info "$TEST_IMG" 2>&1 | _filter_testdir | _filter_qemu
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/070.out b/tests/qemu-iotests/070.out
index 922d62c..15f1fc1 100644
--- a/tests/qemu-iotests/070.out
+++ b/tests/qemu-iotests/070.out
@@ -18,4 +18,11 @@ No errors were found on the image.
 === Verify open image read-only succeeds after log replay ===
 read 18874368/18874368 bytes at offset 0
 18 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+=== Verify image created by Disk2VHD can be opened ===
+image: TEST_DIR/test-disk2vhd.vhdx
+file format: vhdx
+virtual size: 256M (268435456 bytes)
+disk size: 260M
+cluster_size: 2097152
 *** done
diff --git a/tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2 b/tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2
new file mode 100644
index 0000000000000000000000000000000000000000..2891c9a6d62908e0195d3791817284016249aaee
GIT binary patch
literal 1424
zcmZ>Y%CIzaj8qGbG}k{O$Xb_J|NsC0KmUCH-JDzhyZ-zC_y7OrRo{&NR|gc{RqOEm
z=imPqn0Gw*bmiUDGLEd7O!Jz9a-FYyG%@kz4`91;!B*gMCgZ|o{hrI3-5eMf7&2U(
ze2MLfRMjk#3m2F92b;9b3)~wx*_X}#(!AiWP7J&Z7Z*rLWn7%V=F8TQk#Sieg@GYO
z%H#s$1cuB7Co(4-Ibm{f0b4Ia3Io%!MYdbrr~3cDvda022}1^3FSCOb0|sEu@-&&Z
zd{yQz7v?J$7%p6>a$t6L0IPy1Hi78)%CahBQl<Z;+5VngDYs_v^vp6jaD~m;eM-i~
z&Sh$|j1q($7cl#p@Y?z`Wbn)~;$8WKbK(Lv_Z21=7;XxsEqh$#HSI@WE6^;a!cbHI
zu?%7hkTh5`=j@LcDLKD{B^^#a3zjsRcFl8cicgpF_s*b{y^=;gXHGaUxHsk6Z1z!6
zR8jOb5@75|V437mU-yJTMS)R+<!|9h(XdP|@fL<tERWTG&+}1W<Y45=R(WVS*~r-_
zC)tvLS9QX(l#{Jfd<|w?_&irwSR~K$n-GH&gVWNbjzLvv#!ZvhEgL4x<WyO{%dgF0
zhm(_slhXnI%U%l|_%|#KQ59iedZ^gAy6MTT^pA1#JRe_E5V)X}!2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$4UIbn)dbcj%=_t85O{X|r_v(Ec8000NwOCSIM

literal 0
HcmV?d00001

-- 
1.8.3.1

  parent reply	other threads:[~2014-05-19 14:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 14:22 [Qemu-devel] [PULL 00/22] Block patches Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 01/22] block: Fix bdrv_is_allocated() for short backing files Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 02/22] Remove g_sequence_lookup from qemu-img help function Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 03/22] block: vhdx - account for identical header sections Kevin Wolf
2014-05-19 14:22 ` Kevin Wolf [this message]
2014-05-19 14:22 ` [Qemu-devel] [PULL 05/22] qdict: Add qdict_join() Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 06/22] check-qdict: Add test for qdict_join() Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 07/22] block: Allow JSON filenames Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 08/22] iotests: Add test for the JSON protocol Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 09/22] qemu-iotests: Fix core dump suppression in test 039 Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 10/22] qemu-iotests: Fix blkdebug in VM drive in 030 Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 11/22] curl: Fix build when curl_multi_socket_action isn't available Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 12/22] curl: Remove broken parsing of options from url Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 13/22] curl: Add sslverify option Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 14/22] curl: Add usage documentation Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 15/22] qcow1: Make padding in the header explicit Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 16/22] qcow1: Check maximum cluster size Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 17/22] qcow1: Validate L2 table size (CVE-2014-0222) Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 18/22] qcow1: Validate image size (CVE-2014-0223) Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 19/22] qcow1: Stricter backing file length check Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 20/22] util: add qemu_iovec_is_zero Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 21/22] blockdev: add a function to parse enum ids from strings Kevin Wolf
2014-05-19 14:22 ` [Qemu-devel] [PULL 22/22] block: optimize zero writes with bdrv_write_zeroes Kevin Wolf
2014-05-22 14:26 ` [Qemu-devel] [PULL 00/22] Block patches Peter Maydell

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=1400509360-25470-5-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --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).