[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/7] iotests: Rework 113
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH 7/7] iotests: Rework 113 |
Date: |
Wed, 2 May 2018 20:35:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 2018-05-02 20:24, Eric Blake wrote:
> 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 <address@hidden>
>> ---
>> 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).
Well, anyone who's going to run any of these combinations is probably
going to run raw+file as well. You could argue that if someone changes
something about NBD, they might just run raw+nbd; but then again, this
test doesn't really test nbd at all. In fact, it just tests qemu-img
(we simply need a format that does not support image creation, but it's
not like we actually do anything with that format). Same for bochs.
(And I think anyone who wants to test qemu-img is indeed going to run
the raw+file tests.)
But see my reply to John, I think the best way would be if tests like
these could be just run in "default" mode without forcing some
format/protocol combination on them.
Max
signature.asc
Description: OpenPGP digital signature