qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-iotests/195: Change multiple nodes in one


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qemu-iotests/195: Change multiple nodes in one run
Date: Wed, 20 Sep 2017 09:17:41 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/20/2017 07:15 AM, Kevin Wolf wrote:
> This additional check for change-backing-file makes sure that actions on
> one part of the graph don't interfere with later actions elsewhere.
> 
> Suggested-by: Eric Blake <address@hidden>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  tests/qemu-iotests/195     | 17 ++++++++++++++++
>  tests/qemu-iotests/195.out | 51 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
> 

> +run_qemu -drive if=none,file="$TEST_IMG",node-name=top,backing.node-name=mid 
> <<EOF
> +{"execute":"qmp_capabilities"}
> +{"execute":"change-backing-file", 
> "arguments":{"device":"none0","image-node-name":"mid","backing-file":"/dev/null"}}
> +{"execute":"change-backing-file", 
> "arguments":{"device":"none0","image-node-name":"top","backing-file":"/dev/null"}}

I guess 'mid' is still accessible even though 'top' now no longer points
to mid in the header, because we rely on our cache of the relationships
rather than what is written into the header (of course, as soon as qemu
quits, we've broken the chain, but that doesn't matter for this test).

> +{"execute":"change-backing-file", 
> "arguments":{"device":"none0","image-node-name":"mid","backing-file":"/dev/null"}}

Should the second modification to 'mid' be distinct from the first (as
in, back to $TEST_IMG.mid), to make sure we are actually making another
change, rather than triggering some short-cut that might treat a no-op
change as something that can be skipped?  Even bouncing between
"$TEST_IMG.mid", "./$TEST_IMG.mid", and "././$TEST_IMG.mid" will access
the same file (and thus not break the chain), while still making it
obvious which changes took effect, when compared to your change to
/dev/null.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]