From: Jeff Cody <jcody@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] iotests: Add test 197 for covering copy-on-read
Date: Mon, 2 Oct 2017 10:04:22 -0400 [thread overview]
Message-ID: <20171002140422.GB4501@localhost.localdomain> (raw)
In-Reply-To: <834de435-020b-9400-b640-af82968433dd@redhat.com>
On Mon, Oct 02, 2017 at 08:55:50AM -0500, Eric Blake wrote:
> On 09/30/2017 10:03 PM, Jeff Cody wrote:
> > On Sat, Sep 30, 2017 at 03:11:21PM -0500, Eric Blake wrote:
> >> Add a test for qcow2 copy-on-read behavior, including exposure
> >> for the just-fixed bugs.
> >>
> >> The copy-on-read behavior is always to a qcow2 image, but the
> >> test is careful to allow running with most image protocol/format
> >> combos as the backing file being copied from (luks being the
> >> exception, as it is harder to pass the right secret to all the
> >> right places). In fact, for './check nbd', this appears to be
> >> the first time we've had a qcow2 image wrapping NBD, requiring
> >> an additional line in _filter_img_create to match the similar
> >> line in _filter_img_info.
> >>
> >> Signed-off-by: Eric Blake <eblake@redhat.com>
> >>
>
> >> +_cleanup()
> >> +{
> >> + _cleanup_test_img
> >> + rm -f "$BLKDBG_CONF"
> >> +}
> >> +trap "_cleanup; exit \$status" 0 1 2 3 15
> >
> >
> > Note to myself to add this to my iotests series.
>
> Yep, and I even thought about that, since I've been pointing it out on
> other patches, but forgot to mention it when composing the email ;)
>
>
> >> +$QEMU_IO -c "open -C \
> >> + -o driver=blkdebug,config=$BLKDBG_CONF,image.driver=qcow2 $TEST_WRAP" \
> >
> > Hmm, this will lead to issues if $TEST_WRAP has spaces, right?
>
> Probably :( Although I didn't actually test that setup
>
> But I don't know what other options we have to work around it. As long
> as we are executing in the correct directory, I guess we can open both
> BLKDBG_CONF and TEST_WRAP relative to ./ rather than as an absolute
> path, and that should be sufficient to avoid spaces. But I don't know
> how easy that is to achieve, or if _filter_qemu_io will handle it correctly.
>
> Maybe I take the wimpy way out and skip the test if $PWD contains spaces
> or other problematic characters?
>
My thought is if the operation is destructive (writes, creates, deletes) a
file, we want to make sure we do not ruin someone's day by destroying a file
(e.g. "/home/jcody/qemu work", and having /home/jcody/qemu overwritten).
Spaces in pathnames for iotests don't work currently, however. So maybe the
proper thing to do, is for me to add to my iotests series a check for spaces
in TEST_DIR, and just refuse to run any tests at all (with an informative
reason why). And if it is ever fixed so that tests run (and run safely)
with spaces, we can remove that restriction.
Jeff
next prev parent reply other threads:[~2017-10-02 14:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-30 19:53 [Qemu-devel] [PATCH 0/4] block: Avoid copy-on-read assertions Eric Blake
2017-09-30 19:53 ` [Qemu-devel] [PATCH 1/4] qemu-io: Add -C for opening with copy-on-read Eric Blake
2017-10-01 3:00 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 14:52 ` [Qemu-devel] " Kevin Wolf
2017-10-02 18:03 ` John Snow
2017-10-02 19:28 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-09-30 19:53 ` [Qemu-devel] [PATCH 2/4] block: Add blkdebug hook for copy-on-read Eric Blake
2017-10-01 3:00 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 14:52 ` [Qemu-devel] " Kevin Wolf
2017-10-02 18:08 ` John Snow
2017-10-02 19:28 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-09-30 19:53 ` [Qemu-devel] [PATCH 3/4] block: Perform copy-on-read in loop Eric Blake
2017-09-30 20:11 ` [Qemu-devel] [PATCH 4/4] iotests: Add test 197 for covering copy-on-read Eric Blake
2017-10-01 3:03 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-02 13:55 ` Eric Blake
2017-10-02 14:04 ` Jeff Cody [this message]
2017-09-30 21:19 ` [Qemu-devel] [PATCH 0/4] block: Avoid copy-on-read assertions no-reply
2017-09-30 22:05 ` Eric Blake
2017-10-02 14:50 ` Kevin Wolf
2017-10-02 15:10 ` Eric Blake
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=20171002140422.GB4501@localhost.localdomain \
--to=jcody@redhat.com \
--cc=eblake@redhat.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).