On 04/21/2018 11:54 AM, Max Reitz wrote:
This test case has been broken since 398e6ad014df261d (roughly half a
year). qemu-img amend requires its output image to be R/W, so it opens
it as such; the node is then turned into an read-only node automatically
which is now accompanied by a warning, however. This warning has not
been part of the reference output.
The reason nobody has noticed the breakage until now of course is the
fact that nobody runs the iotests for nbd+bochs. There actually was
never any reason to set the protocol to "nbd" but because that was
technically correct; functionally it made no difference. So that is the
first thing we are going to change: Make the protocol "file" instead so
that people might actually notice breakage here.
There's probably several tests that fail with an explicit pairing of nbd
as protocol + explicit format (I'm guilty of usually testing either the
format './check -qcow2' or the protocol './check -nbd', and not
combining the two).
So with this test now being a raw test, we can rework the amend test
case to use raw instead.
Signed-off-by: Max Reitz <mre...@redhat.com>
---
tests/qemu-iotests/113 | 19 +++++++++----------
tests/qemu-iotests/113.out | 7 ++++---
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/qemu-iotests/113 b/tests/qemu-iotests/113
index 19b68b2727..4e09810905 100755
--- a/tests/qemu-iotests/113
+++ b/tests/qemu-iotests/113
@@ -38,16 +38,17 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.rc
. ./common.filter
-# We can only test one format here because we need its sample file
-_supported_fmt bochs
-_supported_proto nbd
+# Some of these test cases use bochs, but others do use raw, so this
+# is only half a lie.
+_supported_fmt raw
+_supported_proto file
Naive question - can we pass a list to _supported_fmt/_supported_proto,
in which case the test runs under both elements of the list? That is,
I'm wondering if:
_supported_fmt raw bochs
_supported_proto file nbd
gives us any additional coverage (theoretically 4 times the testing
possibilities - but if the rest of the test hard-codes a particular
format or protocol then it might not actually execute a different
combination).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org