From: Fam Zheng <famz@redhat.com>
To: Reda Sallahi <fullmanet@gmail.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] qemu-img: add skip option to dd
Date: Thu, 28 Jul 2016 17:08:55 +0800 [thread overview]
Message-ID: <20160728090855.GC9625@ad.usersys.redhat.com> (raw)
In-Reply-To: <20160727145146.8864-1-fullmanet@gmail.com>
On Wed, 07/27 16:51, Reda Sallahi wrote:
> +for skip in $TEST_SKIP_BLOCKS; do
> + echo
> + echo "== Creating image =="
> +
> + size=1M
> + _make_test_img $size
> + _check_test_img
> + $QEMU_IO -c "write -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
I think the data pattern could to be made less plain (i.e. add some variantion
based on the offset), to catch any misplacement bug in qemu-img dd (for example
off by one errors).
Fam
> +
> + echo
> + echo "== Converting the image with dd with skip=$skip =="
> +
> + $QEMU_IMG dd if="$TEST_IMG" of="$TEST_IMG.out" skip="$skip" -O "$IMGFMT" \
> + 2> /dev/null
> + $QEMU_IMG check "$TEST_IMG.out" -f "$IMGFMT" 2>&1 | _filter_testdir | \
> + _filter_qemu_img_check
> + dd if="$TEST_IMG" of="$TEST_IMG.out.dd" skip="$skip" status=none
> + echo
> + echo "== Compare the images with qemu-img compare =="
> +
> + $QEMU_IMG compare "$TEST_IMG.out.dd" "$TEST_IMG.out"
> +done
next prev parent reply other threads:[~2016-07-28 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 14:51 [Qemu-devel] [PATCH v3] qemu-img: add skip option to dd Reda Sallahi
2016-07-28 9:08 ` Fam Zheng [this message]
2016-07-28 9:12 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-07-28 15:51 ` Reda Sallahi
2016-08-03 9:00 ` Stefan Hajnoczi
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=20160728090855.GC9625@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=fullmanet@gmail.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).